ADD db schema in models

This commit is contained in:
Jasder
2020-11-23 15:35:03 +08:00
parent ba1115f1f3
commit 60ac66ebe3
82 changed files with 1711 additions and 25 deletions

View File

@@ -1,3 +1,21 @@
# == Schema Information
#
# Table name: open_users
#
# id :integer not null, primary key
# user_id :integer
# type :string(255)
# uid :string(255)
# created_at :datetime not null
# updated_at :datetime not null
# extra :text(65535)
#
# Indexes
#
# index_open_users_on_type_and_uid (type,uid) UNIQUE
# index_open_users_on_user_id (user_id)
#
class OpenUsers::Cas < OpenUser
def nickname
extra&.[]('nickname')
@@ -6,4 +24,4 @@ class OpenUsers::Cas < OpenUser
def en_type
'cas'
end
end
end

View File

@@ -1,3 +1,21 @@
# == Schema Information
#
# Table name: open_users
#
# id :integer not null, primary key
# user_id :integer
# type :string(255)
# uid :string(255)
# created_at :datetime not null
# updated_at :datetime not null
# extra :text(65535)
#
# Indexes
#
# index_open_users_on_type_and_uid (type,uid) UNIQUE
# index_open_users_on_user_id (user_id)
#
class OpenUsers::Educoder < OpenUser
def nickname
extra&.[]('nickname')

View File

@@ -1,3 +1,21 @@
# == Schema Information
#
# Table name: open_users
#
# id :integer not null, primary key
# user_id :integer
# type :string(255)
# uid :string(255)
# created_at :datetime not null
# updated_at :datetime not null
# extra :text(65535)
#
# Indexes
#
# index_open_users_on_type_and_uid (type,uid) UNIQUE
# index_open_users_on_user_id (user_id)
#
class OpenUsers::QQ < OpenUser
def nickname
extra&.[]('nickname')
@@ -6,4 +24,4 @@ class OpenUsers::QQ < OpenUser
def en_type
'qq'
end
end
end

View File

@@ -1,3 +1,21 @@
# == Schema Information
#
# Table name: open_users
#
# id :integer not null, primary key
# user_id :integer
# type :string(255)
# uid :string(255)
# created_at :datetime not null
# updated_at :datetime not null
# extra :text(65535)
#
# Indexes
#
# index_open_users_on_type_and_uid (type,uid) UNIQUE
# index_open_users_on_user_id (user_id)
#
class OpenUsers::Wechat < OpenUser
def nickname
extra&.[]('nickname')
@@ -6,4 +24,4 @@ class OpenUsers::Wechat < OpenUser
def en_type
'wechat'
end
end
end