增加点击时间表

This commit is contained in:
huang 2015-09-06 15:31:48 +08:00
parent bb15f00637
commit c579ee51fe
5 changed files with 51 additions and 16 deletions

View File

@ -0,0 +1,3 @@
class OnclickTime < ActiveRecord::Base
attr_accessible :onclick_time, :user_id
end

View File

@ -0,0 +1,10 @@
class CreateOnclickTimes < ActiveRecord::Migration
def change
create_table :onclick_times do |t|
t.integer :user_id
t.datetime :onclick_time
t.timestamps
end
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150906025009) do
ActiveRecord::Schema.define(:version => 20150906065702) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -497,23 +497,26 @@ ActiveRecord::Schema.define(:version => 20150906025009) do
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
add_index "documents", ["project_id"], :name => "documents_project_id"
create_table "dts", :force => true do |t|
t.string "IPLineCode"
t.string "Description"
t.string "Num"
t.string "Variable"
t.string "TraceInfo"
t.string "Method"
create_table "dts", :primary_key => "Num", :force => true do |t|
t.string "Defect", :limit => 50
t.string "Category", :limit => 50
t.string "File"
t.string "IPLine"
t.string "Review"
t.string "Category"
t.string "Defect"
t.string "PreConditions"
t.string "StartLine"
t.string "Method"
t.string "Module", :limit => 20
t.string "Variable", :limit => 50
t.integer "StartLine"
t.integer "IPLine"
t.string "IPLineCode", :limit => 200
t.string "Judge", :limit => 15
t.integer "Review", :limit => 1
t.string "Description"
t.text "PreConditions", :limit => 2147483647
t.text "TraceInfo", :limit => 2147483647
t.text "Code", :limit => 2147483647
t.integer "project_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "id", :null => false
end
create_table "enabled_modules", :force => true do |t|
@ -936,6 +939,13 @@ ActiveRecord::Schema.define(:version => 20150906025009) do
t.datetime "updated_at", :null => false
end
create_table "onclick_times", :force => true do |t|
t.integer "user_id"
t.datetime "onclick_time"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "open_id_authentication_associations", :force => true do |t|
t.integer "issued"
t.integer "lifetime"

View File

@ -0,0 +1,7 @@
FactoryGirl.define do
factory :onclick_time do
user_id 1
onclick_time "2015-09-06 14:57:02"
end
end

View File

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe OnclickTime, :type => :model do
pending "add some examples to (or delete) #{__FILE__}"
end