Update model schemas

This commit is contained in:
Jasder 2020-12-23 15:48:07 +08:00
parent 01f79c81cc
commit 32a52a5c7a
6 changed files with 120 additions and 127 deletions

View File

@ -9,7 +9,7 @@
# disk_filename :string(255) default(""), not null # disk_filename :string(255) default(""), not null
# filesize :integer default("0"), not null # filesize :integer default("0"), not null
# content_type :string(255) default("") # content_type :string(255) default("")
# digest :string(40) default(""), not null # digest :string(60) default(""), not null
# downloads :integer default("0"), not null # downloads :integer default("0"), not null
# author_id :integer default("0"), not null # author_id :integer default("0"), not null
# created_on :datetime # created_on :datetime
@ -18,17 +18,23 @@
# attachtype :integer default("1") # attachtype :integer default("1")
# is_public :integer default("1") # is_public :integer default("1")
# copy_from :integer # copy_from :integer
# quotes :integer # quotes :integer default("0")
# is_publish :integer default("1") # is_publish :integer default("1")
# publish_time :datetime # publish_time :datetime
# memo_image :boolean default("0") # resource_bank_id :integer
# extra_type :integer default("0") # unified_setting :boolean default("1")
# cloud_url :string(255) default("")
# course_second_category_id :integer default("0")
# delay_publish :boolean default("0")
# #
# Indexes # Indexes
# #
# index_attachments_on_author_id (author_id) # index_attachments_on_author_id (author_id)
# index_attachments_on_container_id_and_container_type (container_id,container_type) # index_attachments_on_container_id_and_container_type (container_id,container_type)
# index_attachments_on_course_second_category_id (course_second_category_id)
# index_attachments_on_created_on (created_on) # index_attachments_on_created_on (created_on)
# index_attachments_on_is_public (is_public)
# index_attachments_on_quotes (quotes)
# #
class Attachment < ApplicationRecord class Attachment < ApplicationRecord

View File

@ -45,10 +45,6 @@
# is_shixun_marker :boolean default("0") # is_shixun_marker :boolean default("0")
# is_sync_pwd :boolean default("1") # is_sync_pwd :boolean default("1")
# watchers_count :integer default("0") # watchers_count :integer default("0")
# visibility :string(255) default("public")
# repo_admin_change_team_access :boolean default("1")
# is_org :boolean default("0")
# website :string(255)
# devops_step :integer default("0") # devops_step :integer default("0")
# #
# Indexes # Indexes

View File

@ -11,11 +11,6 @@
# sync_subject :boolean default("0") # sync_subject :boolean default("0")
# sync_shixun :boolean default("0") # sync_shixun :boolean default("0")
# #
# Indexes
#
# index_laboratories_on_identifier (identifier) UNIQUE
# index_laboratories_on_school_id (school_id)
#
class Laboratory < ApplicationRecord class Laboratory < ApplicationRecord
belongs_to :school, optional: true belongs_to :school, optional: true

View File

@ -6,10 +6,6 @@
# laboratory_id :integer # laboratory_id :integer
# config :text(65535) # config :text(65535)
# #
# Indexes
#
# index_laboratory_settings_on_laboratory_id (laboratory_id)
#
class LaboratorySetting < ApplicationRecord class LaboratorySetting < ApplicationRecord
belongs_to :laboratory belongs_to :laboratory

View File

@ -6,10 +6,14 @@
# user_id :integer not null # user_id :integer not null
# praise_tread_object_id :integer # praise_tread_object_id :integer
# praise_tread_object_type :string(255) # praise_tread_object_type :string(255)
# praise_or_tread :integer # praise_or_tread :integer default("1")
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# #
# Indexes
#
# praise_tread (praise_tread_object_id,praise_tread_object_type)
#
class PraiseTread < ApplicationRecord class PraiseTread < ApplicationRecord
belongs_to :user belongs_to :user

View File

@ -45,10 +45,6 @@
# is_shixun_marker :boolean default("0") # is_shixun_marker :boolean default("0")
# is_sync_pwd :boolean default("1") # is_sync_pwd :boolean default("1")
# watchers_count :integer default("0") # watchers_count :integer default("0")
# visibility :string(255) default("public")
# repo_admin_change_team_access :boolean default("1")
# is_org :boolean default("0")
# website :string(255)
# devops_step :integer default("0") # devops_step :integer default("0")
# #
# Indexes # Indexes