mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
ADD db schema in models
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user