dao

package
v0.33.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2023 License: AGPL-3.0, AGPL-3.0-only Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameAccessToken = "chii_oauth_access_tokens"
View Source
const TableNameCast = "chii_crt_cast_index"
View Source
const TableNameCharacter = "chii_characters"
View Source
const TableNameCharacterSubjects = "chii_crt_subject_index"
View Source
const TableNameEpCollection = "chii_ep_status"
View Source
const TableNameEpisode = "chii_episodes"
View Source
const TableNameFriend = "chii_friends"
View Source
const TableNameIndex = "chii_index"
View Source
const TableNameIndexCollect = "chii_index_collects"
View Source
const TableNameIndexSubject = "chii_index_related"
View Source
const TableNameMember = "chii_members"
View Source
const TableNameMemberField = "chii_memberfields"
View Source
const TableNameNotification = "chii_notify"
View Source
const TableNameNotificationField = "chii_notify_field"
View Source
const TableNamePerson = "chii_persons"
View Source
const TableNamePersonField = "chii_person_fields"
View Source
const TableNamePersonSubjects = "chii_person_cs_index"
View Source
const TableNamePrivateMessage = "chii_pms"
View Source
const TableNameRevisionHistory = "chii_rev_history"
View Source
const TableNameRevisionText = "chii_rev_text"
View Source
const TableNameSubject = "chii_subjects"
View Source
const TableNameSubjectCollection = "chii_subject_interests"
View Source
const TableNameSubjectField = "chii_subject_fields"
View Source
const TableNameSubjectRelation = "chii_subject_relations"
View Source
const TableNameSubjectRevision = "chii_subject_revisions"
View Source
const TableNameUserGroup = "chii_usergroup"
View Source
const TableNameWebSession = "chii_os_web_sessions"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	ID          uint32    `gorm:"column:id;type:mediumint(8);primaryKey;autoIncrement:true"`
	Type        uint8     `gorm:"column:type;type:tinyint(1) unsigned;not null"`
	AccessToken string    `gorm:"column:access_token;type:varchar(40);not null"`
	ClientID    string    `gorm:"column:client_id;type:varchar(80);not null"`
	UserID      string    `gorm:"column:user_id;type:varchar(80)"`
	ExpiredAt   time.Time `gorm:"column:expires;type:timestamp;not null;default:CURRENT_TIMESTAMP"`
	Scope       *string   `gorm:"column:scope;type:varchar(4000)"`
	Info        []byte    `gorm:"column:info;type:varchar(255);not null"`
}

AccessToken mapped from table <chii_oauth_access_tokens>

func (*AccessToken) TableName

func (*AccessToken) TableName() string

TableName AccessToken's table name

type Cast

type Cast struct {
	CharacterID   uint32 `gorm:"column:crt_id;type:mediumint(9) unsigned;primaryKey"`
	PersonID      uint32 `gorm:"column:prsn_id;type:mediumint(9) unsigned;primaryKey"`
	SubjectID     uint32 `gorm:"column:subject_id;type:mediumint(9) unsigned;primaryKey"`
	SubjectTypeID uint8  `` // 根据人物归类查询角色,动画,书籍,游戏
	/* 129-byte string literal not displayed */
	Summary   string    `gorm:"column:summary;type:varchar(255);not null;comment:幼年,男乱马,女乱马,变身形态,少女形态。。"` // 幼年,男乱马,女乱马,变身形态,少女形态。。
	Character Character `gorm:"foreignKey:crt_id;references:crt_id" json:"character"`
	Subject   Subject   `gorm:"foreignKey:subject_id;references:subject_id" json:"subject"`
	Person    Person    `gorm:"foreignKey:prsn_id;references:prsn_id" json:"person"`
}

Cast mapped from table <chii_crt_cast_index>

func (*Cast) TableName

func (*Cast) TableName() string

TableName Cast's table name

type Character

type Character struct {
	ID       uint32      `gorm:"column:crt_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	Name     string      `gorm:"column:crt_name;type:varchar(255);not null"`
	Role     uint8       `gorm:"column:crt_role;type:tinyint(4) unsigned;not null;comment:角色,机体,组织。。"` // 角色,机体,组织。。
	Infobox  string      `gorm:"column:crt_infobox;type:mediumtext;not null"`
	Summary  string      `gorm:"column:crt_summary;type:mediumtext;not null"`
	Img      string      `gorm:"column:crt_img;type:varchar(255);not null"`
	Comment  uint32      `gorm:"column:crt_comment;type:mediumint(9) unsigned;not null"`
	Collects uint32      `gorm:"column:crt_collects;type:mediumint(8) unsigned;not null"`
	Dateline uint32      `gorm:"column:crt_dateline;type:int(10) unsigned;not null"`
	Lastpost uint32      `gorm:"column:crt_lastpost;type:int(11) unsigned;not null"`
	Lock     int8        `gorm:"column:crt_lock;type:tinyint(4);not null"`
	ImgAnidb string      `gorm:"column:crt_img_anidb;type:varchar(255);not null"`         // Deprecated
	AnidbID  uint32      `gorm:"column:crt_anidb_id;type:mediumint(8) unsigned;not null"` // Deprecated
	Ban      uint8       `gorm:"column:crt_ban;type:tinyint(3) unsigned;not null"`
	Redirect uint32      `gorm:"column:crt_redirect;type:int(10) unsigned;not null"`
	Nsfw     bool        `gorm:"column:crt_nsfw;type:tinyint(1) unsigned;not null"`
	Fields   PersonField `gorm:"foreignKey:crt_id;polymorphic:Owner;polymorphicValue:crt" json:"fields"`
}

Character mapped from table <chii_characters>

func (*Character) TableName

func (*Character) TableName() string

TableName Character's table name

type CharacterSubjects

type CharacterSubjects struct {
	CharacterID   uint32    `gorm:"column:crt_id;type:mediumint(9) unsigned;primaryKey"`
	SubjectID     uint32    `gorm:"column:subject_id;type:mediumint(9) unsigned;primaryKey"`
	SubjectTypeID uint8     `gorm:"column:subject_type_id;type:tinyint(4) unsigned;not null"`
	CrtType       uint8     `gorm:"column:crt_type;type:tinyint(4) unsigned;not null;comment:主角,配角"`    // 主角,配角
	CtrAppearEps  string    `gorm:"column:ctr_appear_eps;type:mediumtext;not null;comment:可选,角色出场的的章节"` // 可选,角色出场的的章节
	CrtOrder      uint8     `gorm:"column:crt_order;type:tinyint(3) unsigned;not null"`
	Character     Character `gorm:"foreignKey:crt_id;references:crt_id" json:"character"`
	Subject       Subject   `gorm:"foreignKey:subject_id;references:subject_id" json:"subject"`
}

CharacterSubjects mapped from table <chii_crt_subject_index>

func (*CharacterSubjects) TableName

func (*CharacterSubjects) TableName() string

TableName CharacterSubjects's table name

type EpCollection

type EpCollection struct {
	ID          uint32 `gorm:"column:ep_stt_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	UserID      uint32 `gorm:"column:ep_stt_uid;type:mediumint(8) unsigned;not null"`
	SubjectID   uint32 `gorm:"column:ep_stt_sid;type:mediumint(8) unsigned;not null"`
	OnPrg       bool   `gorm:"column:ep_stt_on_prg;type:tinyint(1) unsigned;not null"`
	Status      []byte `gorm:"column:ep_stt_status;type:mediumtext;not null"`
	UpdatedTime uint32 `gorm:"column:ep_stt_lasttouch;type:int(10) unsigned;not null"`
}

EpCollection mapped from table <chii_ep_status>

func (*EpCollection) TableName

func (*EpCollection) TableName() string

TableName EpCollection's table name

type Episode

type Episode struct {
	ID        uint32  `gorm:"column:ep_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	SubjectID uint32  `gorm:"column:ep_subject_id;type:mediumint(8) unsigned;not null"`
	Sort      float32 `gorm:"column:ep_sort;type:float unsigned;not null"`
	Type      uint8   `gorm:"column:ep_type;type:tinyint(1) unsigned;not null"`
	Disc      uint8   `gorm:"column:ep_disc;type:tinyint(3) unsigned;not null;comment:碟片数"` // 碟片数
	Name      string  `gorm:"column:ep_name;type:varchar(80);not null"`
	NameCn    string  `gorm:"column:ep_name_cn;type:varchar(80);not null"`
	Rate      int8    `gorm:"column:ep_rate;type:tinyint(3);not null"`
	Duration  string  `gorm:"column:ep_duration;type:varchar(80);not null"`
	Airdate   string  `gorm:"column:ep_airdate;type:varchar(80);not null"`
	Online    string  `gorm:"column:ep_online;type:mediumtext;not null"`
	Comment   uint32  `gorm:"column:ep_comment;type:mediumint(8) unsigned;not null"`
	Resources uint32  `gorm:"column:ep_resources;type:mediumint(8) unsigned;not null"`
	Desc      string  `gorm:"column:ep_desc;type:mediumtext;not null"`
	Dateline  uint32  `gorm:"column:ep_dateline;type:int(10) unsigned;not null"`
	Lastpost  uint32  `gorm:"column:ep_lastpost;type:int(10) unsigned;not null"`
	Lock      uint8   `gorm:"column:ep_lock;type:tinyint(3) unsigned;not null"`
	Ban       uint8   `gorm:"column:ep_ban;type:tinyint(3) unsigned;not null"`
	Subject   Subject `gorm:"foreignKey:ep_subject_id;references:subject_id" json:"subject"`
}

Episode mapped from table <chii_episodes>

func (*Episode) TableName

func (*Episode) TableName() string

TableName Episode's table name

type Friend

type Friend struct {
	UserID      uint32 `gorm:"column:frd_uid;type:mediumint(8) unsigned;not null"`
	FriendID    uint32 `gorm:"column:frd_fid;type:mediumint(8) unsigned;not null"`
	Grade       uint8  `gorm:"column:frd_grade;type:tinyint(3) unsigned;not null;default:1"`
	CreatedTime uint32 `gorm:"column:frd_dateline;type:int(10) unsigned;not null"`
	Description string `gorm:"column:frd_description;type:char(255);not null"`
}

Friend mapped from table <chii_friends>

func (*Friend) TableName

func (*Friend) TableName() string

TableName Friend's table name

type Index

type Index struct {
	ID           uint32                `gorm:"column:idx_id;type:mediumint(8);primaryKey;autoIncrement:true;comment:自动id"` // 自动id
	Type         uint8                 `gorm:"column:idx_type;type:tinyint(3) unsigned;not null"`
	Title        string                `gorm:"column:idx_title;type:varchar(80);not null;comment:标题"`                       // 标题
	Desc         string                `gorm:"column:idx_desc;type:mediumtext;not null;comment:简介"`                         // 简介
	ReplyCount   uint32                `gorm:"column:idx_replies;type:mediumint(8) unsigned;not null;comment:回复数"`          // 回复数
	SubjectCount uint32                `gorm:"column:idx_subject_total;type:mediumint(8) unsigned;not null;comment:内含条目总数"` // 内含条目总数
	CollectCount uint32                `gorm:"column:idx_collects;type:mediumint(8);not null;comment:收藏数"`                  // 收藏数
	Stats        string                `gorm:"column:idx_stats;type:mediumtext;not null"`
	CreatedTime  int32                 `gorm:"column:idx_dateline;type:int(10);not null;comment:创建时间"` // 创建时间
	UpdatedTime  uint32                `gorm:"column:idx_lasttouch;type:int(10) unsigned;not null"`
	CreatorID    uint32                `gorm:"column:idx_uid;type:mediumint(8);not null;comment:创建人UID"` // 创建人UID
	Deleted      soft_delete.DeletedAt `gorm:"column:idx_ban;type:tinyint(1) unsigned;not null;softDelete:flag"`
}

Index mapped from table <chii_index>

func (*Index) TableName

func (*Index) TableName() string

TableName Index's table name

type IndexCollect added in v0.32.0

type IndexCollect struct {
	CltID       uint32 `gorm:"column:idx_clt_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	IndexID     uint32 `gorm:"column:idx_clt_mid;type:mediumint(8) unsigned;not null;comment:目录ID"`  // 目录ID
	UserID      uint32 `gorm:"column:idx_clt_uid;type:mediumint(8) unsigned;not null;comment:用户UID"` // 用户UID
	CreatedTime uint32 `gorm:"column:idx_clt_dateline;type:int(10) unsigned;not null"`
}

IndexCollect mapped from table <chii_index_collects>

func (*IndexCollect) TableName added in v0.32.0

func (*IndexCollect) TableName() string

TableName IndexCollect's table name

type IndexSubject

type IndexSubject struct {
	ID          uint32                `gorm:"column:idx_rlt_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	Cat         int8                  `gorm:"column:idx_rlt_cat;type:tinyint(3);not null"`
	IndexID     uint32                `gorm:"column:idx_rlt_rid;type:mediumint(8) unsigned;not null;comment:关联目录"`   // 关联目录
	SubjectType uint8                 `gorm:"column:idx_rlt_type;type:smallint(6) unsigned;not null;comment:关联条目类型"` // 关联条目类型
	SubjectID   uint32                `gorm:"column:idx_rlt_sid;type:mediumint(8) unsigned;not null;comment:关联条目ID"` // 关联条目ID
	Order       uint32                `gorm:"column:idx_rlt_order;type:mediumint(8) unsigned;not null"`
	Comment     string                `gorm:"column:idx_rlt_comment;type:mediumtext;not null"`
	CreatedTime uint32                `gorm:"column:idx_rlt_dateline;type:int(10) unsigned;not null"`
	Deleted     soft_delete.DeletedAt `gorm:"column:idx_rlt_ban;type:tinyint(1) unsigned;not null;softDelete:flag"`
	Subject     Subject               `gorm:"foreignKey:idx_rlt_sid;references:subject_id" json:"subject"`
}

IndexSubject mapped from table <chii_index_related>

func (*IndexSubject) TableName

func (*IndexSubject) TableName() string

TableName IndexSubject's table name

type Member

type Member struct {
	ID            uint32                     `gorm:"column:uid;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	Username      string                     `gorm:"column:username;type:char(15);not null"`
	Nickname      string                     `gorm:"column:nickname;type:varchar(30);not null"`
	Avatar        string                     `gorm:"column:avatar;type:varchar(255);not null"`
	Groupid       uint8                      `gorm:"column:groupid;type:smallint(6) unsigned;not null"`
	Regdate       int64                      `gorm:"column:regdate;type:int(10) unsigned;not null"`
	Lastvisit     uint32                     `gorm:"column:lastvisit;type:int(10) unsigned;not null"`
	Lastactivity  uint32                     `gorm:"column:lastactivity;type:int(10) unsigned;not null"`
	Lastpost      uint32                     `gorm:"column:lastpost;type:int(10) unsigned;not null"`
	Dateformat    string                     `gorm:"column:dateformat;type:char(10);not null"`
	Timeformat    bool                       `gorm:"column:timeformat;type:tinyint(1);not null"`
	Timeoffset    string                     `gorm:"column:timeoffset;type:char(4);not null"`
	Newpm         bool                       `gorm:"column:newpm;type:tinyint(1);not null"`
	NewNotify     uint16                     `gorm:"column:new_notify;type:smallint(6) unsigned;not null;comment:新提醒"` // 新提醒
	Sign          utiltype.HTMLEscapedString `gorm:"column:sign;type:varchar(255);not null"`
	PasswordCrypt []byte                     `gorm:"column:password_crypt;type:char(64);not null"`
	Email         string                     `gorm:"column:email;type:char(50);not null"`
	Acl           string                     `gorm:"column:acl;type:mediumtext;not null"`
	Fields        MemberField                `gorm:"foreignKey:uid;references:uid" json:"fields"`
}

Member mapped from table <chii_members>

func (*Member) TableName

func (*Member) TableName() string

TableName Member's table name

type MemberField

type MemberField struct {
	UID       uint32 `gorm:"column:uid;type:mediumint(8) unsigned;primaryKey"`
	Site      string `gorm:"column:site;type:varchar(75);not null"`
	Location  string `gorm:"column:location;type:varchar(30);not null"`
	Bio       string `gorm:"column:bio;type:text;not null"`
	Privacy   []byte `gorm:"column:privacy;type:mediumtext;not null"`
	Blocklist string `gorm:"column:blocklist;type:mediumtext;not null"`
}

MemberField mapped from table <chii_memberfields>

func (*MemberField) TableName

func (*MemberField) TableName() string

TableName MemberField's table name

type Notification

type Notification struct {
	ID          uint32 `gorm:"column:nt_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	ReceiverID  uint32 `gorm:"column:nt_uid;type:mediumint(8) unsigned;not null"`
	SenderID    uint32 `gorm:"column:nt_from_uid;type:mediumint(8) unsigned;not null"`
	Status      uint8  `gorm:"column:nt_status;type:tinyint(1) unsigned;not null;default:1"`
	Type        uint8  `gorm:"column:nt_type;type:tinyint(3) unsigned;not null"`
	FieldID     uint32 `gorm:"column:nt_mid;type:mediumint(8) unsigned;not null;comment:ID in notify_field"` // ID in notify_field
	RelatedID   uint32 `gorm:"column:nt_related_id;type:int(10) unsigned;not null"`
	CreatedTime uint32 `gorm:"column:nt_dateline;type:int(10) unsigned;not null"`
}

Notification mapped from table <chii_notify>

func (*Notification) TableName

func (*Notification) TableName() string

TableName Notification's table name

type NotificationField

type NotificationField struct {
	ID          uint32 `gorm:"column:ntf_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	RelatedType uint8  `gorm:"column:ntf_hash;type:tinyint(3) unsigned;not null"`
	RelatedID   uint32 `gorm:"column:ntf_rid;type:int(10) unsigned;not null"`
	Title       string `gorm:"column:ntf_title;type:varchar(255);not null"`
}

NotificationField mapped from table <chii_notify_field>

func (*NotificationField) TableName

func (*NotificationField) TableName() string

TableName NotificationField's table name

type Person

type Person struct {
	ID          uint32      `gorm:"column:prsn_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	Name        string      `gorm:"column:prsn_name;type:varchar(255);not null"`
	Type        uint8       `gorm:"column:prsn_type;type:tinyint(4) unsigned;not null;comment:个人,公司,组合"` // 个人,公司,组合
	Infobox     string      `gorm:"column:prsn_infobox;type:mediumtext;not null"`
	Producer    bool        `gorm:"column:prsn_producer;type:tinyint(1);not null"`
	Mangaka     bool        `gorm:"column:prsn_mangaka;type:tinyint(1);not null"`
	Artist      bool        `gorm:"column:prsn_artist;type:tinyint(1);not null"`
	Seiyu       bool        `gorm:"column:prsn_seiyu;type:tinyint(1);not null"`
	Writer      bool        `gorm:"column:prsn_writer;type:tinyint(4);not null;comment:作家"`      // 作家
	Illustrator bool        `gorm:"column:prsn_illustrator;type:tinyint(4);not null;comment:绘师"` // 绘师
	Actor       bool        `gorm:"column:prsn_actor;type:tinyint(1);not null;comment:演员"`       // 演员
	Summary     string      `gorm:"column:prsn_summary;type:mediumtext;not null"`
	Img         string      `gorm:"column:prsn_img;type:varchar(255);not null"`
	ImgAnidb    string      `gorm:"column:prsn_img_anidb;type:varchar(255);not null"` // Deprecated
	Comment     uint32      `gorm:"column:prsn_comment;type:mediumint(9) unsigned;not null"`
	Collects    uint32      `gorm:"column:prsn_collects;type:mediumint(8) unsigned;not null"`
	Dateline    uint32      `gorm:"column:prsn_dateline;type:int(10) unsigned;not null"`
	Lastpost    uint32      `gorm:"column:prsn_lastpost;type:int(11) unsigned;not null"`
	Lock        int8        `gorm:"column:prsn_lock;type:tinyint(4);not null"`
	AnidbID     uint32      `gorm:"column:prsn_anidb_id;type:mediumint(8) unsigned;not null"` // Deprecated
	Ban         uint8       `gorm:"column:prsn_ban;type:tinyint(3) unsigned;not null"`
	Redirect    uint32      `gorm:"column:prsn_redirect;type:int(10) unsigned;not null"`
	Nsfw        bool        `gorm:"column:prsn_nsfw;type:tinyint(1) unsigned;not null"`
	Fields      PersonField `gorm:"foreignKey:prsn_id;polymorphic:Owner;polymorphicValue:prsn" json:"fields"`
}

Person mapped from table <chii_persons>

func (*Person) TableName

func (*Person) TableName() string

TableName Person's table name

type PersonField

type PersonField struct {
	OwnerType string `gorm:"column:prsn_cat;type:enum('prsn','crt');primaryKey"`
	OwnerID   uint32 `gorm:"column:prsn_id;type:int(8) unsigned;primaryKey"`
	Gender    uint8  `gorm:"column:gender;type:tinyint(4) unsigned;not null"`
	Bloodtype uint8  `gorm:"column:bloodtype;type:tinyint(4) unsigned;not null"`
	BirthYear uint16 `gorm:"column:birth_year;type:year(4);not null"`
	BirthMon  uint8  `gorm:"column:birth_mon;type:tinyint(2) unsigned;not null"`
	BirthDay  uint8  `gorm:"column:birth_day;type:tinyint(2) unsigned;not null"`
}

PersonField mapped from table <chii_person_fields>

func (*PersonField) TableName

func (*PersonField) TableName() string

TableName PersonField's table name

type PersonSubjects

type PersonSubjects struct {
	PrsnType      string  `gorm:"column:prsn_type;type:enum('prsn','crt');primaryKey"`
	PersonID      uint32  `gorm:"column:prsn_id;type:mediumint(9) unsigned;primaryKey"`
	PrsnPosition  uint16  `gorm:"column:prsn_position;type:smallint(5) unsigned;primaryKey;comment:监督,原案,脚本,.."` // 监督,原案,脚本,..
	SubjectID     uint32  `gorm:"column:subject_id;type:mediumint(9) unsigned;primaryKey"`
	SubjectTypeID uint8   `gorm:"column:subject_type_id;type:tinyint(4) unsigned;not null"`
	Summary       string  `gorm:"column:summary;type:mediumtext;not null"`
	PrsnAppearEps string  `gorm:"column:prsn_appear_eps;type:mediumtext;not null;comment:可选,人物参与的章节"` // 可选,人物参与的章节
	Subject       Subject `gorm:"foreignKey:subject_id;references:subject_id" json:"subject"`
	Person        Person  `gorm:"foreignKey:prsn_id;references:prsn_id" json:"person"`
}

PersonSubjects mapped from table <chii_person_cs_index>

func (*PersonSubjects) TableName

func (*PersonSubjects) TableName() string

TableName PersonSubjects's table name

type PrivateMessage

type PrivateMessage struct {
	ID                uint32 `gorm:"column:msg_id;type:int(10) unsigned;primaryKey;autoIncrement:true"`
	SenderID          uint32 `gorm:"column:msg_sid;type:mediumint(8) unsigned;not null"`
	ReceiverID        uint32 `gorm:"column:msg_rid;type:mediumint(8) unsigned;not null"`
	Folder            string `gorm:"column:msg_folder;type:enum('inbox','outbox');not null;default:inbox"`
	New               bool   `gorm:"column:msg_new;type:tinyint(1);not null"`
	Title             string `gorm:"column:msg_title;type:varchar(75);not null"`
	CreatedTime       uint32 `gorm:"column:msg_dateline;type:int(10) unsigned;not null"`
	Content           string `gorm:"column:msg_message;type:text;not null"`
	MainMessageID     uint32 `gorm:"column:msg_related_main;type:int(10) unsigned;not null"`
	RelatedMessageID  uint32 `gorm:"column:msg_related;type:int(10) unsigned;not null"`
	DeletedBySender   bool   `gorm:"column:msg_sdeleted;type:tinyint(1) unsigned;not null"`
	DeletedByReceiver bool   `gorm:"column:msg_rdeleted;type:tinyint(1) unsigned;not null"`
}

PrivateMessage mapped from table <chii_pms>

func (*PrivateMessage) TableName

func (*PrivateMessage) TableName() string

TableName PrivateMessage's table name

type RevisionHistory

type RevisionHistory struct {
	ID          uint32 `gorm:"column:rev_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	Type        uint8  `gorm:"column:rev_type;type:tinyint(3) unsigned;not null;comment:条目,角色,人物"`    // 条目,角色,人物
	Mid         uint32 `gorm:"column:rev_mid;type:mediumint(8) unsigned;not null;comment:对应条目,人物的ID"` // 对应条目,人物的ID
	TextID      uint32 `gorm:"column:rev_text_id;type:mediumint(9) unsigned;not null"`
	CreatedTime uint32 `gorm:"column:rev_dateline;type:int(10) unsigned;not null"`
	CreatorID   uint32 `gorm:"column:rev_creator;type:mediumint(8) unsigned;not null"`
	Summary     string `gorm:"column:rev_edit_summary;type:varchar(200);not null"`
}

RevisionHistory mapped from table <chii_rev_history>

func (*RevisionHistory) TableName

func (*RevisionHistory) TableName() string

TableName RevisionHistory's table name

type RevisionText

type RevisionText struct {
	TextID uint32 `gorm:"column:rev_text_id;type:mediumint(9) unsigned;primaryKey;autoIncrement:true"`
	Text   []byte `gorm:"column:rev_text;type:mediumblob;not null"`
}

RevisionText mapped from table <chii_rev_text>

func (*RevisionText) TableName

func (*RevisionText) TableName() string

TableName RevisionText's table name

type Subject

type Subject struct {
	ID          uint32       `gorm:"column:subject_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	TypeID      uint8        `gorm:"column:subject_type_id;type:smallint(6) unsigned;not null"`
	Name        string       `gorm:"column:subject_name;type:varchar(80);not null"`
	NameCN      string       `gorm:"column:subject_name_cn;type:varchar(80);not null"`
	UID         string       `gorm:"column:subject_uid;type:varchar(20);not null;comment:isbn / imdb"` // isbn / imdb
	Creator     uint32       `gorm:"column:subject_creator;type:mediumint(8) unsigned;not null"`
	Dateline    uint32       `gorm:"column:subject_dateline;type:int(10) unsigned;not null"`
	Image       string       `gorm:"column:subject_image;type:varchar(255);not null"`
	Platform    uint16       `gorm:"column:subject_platform;type:smallint(6) unsigned;not null"`
	Infobox     string       `gorm:"column:field_infobox;type:mediumtext;not null"`
	Summary     string       `gorm:"column:field_summary;type:mediumtext;not null;comment:summary"`       // summary
	Field5      string       `gorm:"column:field_5;type:mediumtext;not null;comment:author summary"`      // author summary
	Volumes     uint32       `gorm:"column:field_volumes;type:mediumint(8) unsigned;not null;comment:卷数"` // 卷数
	Eps         uint32       `gorm:"column:field_eps;type:mediumint(8) unsigned;not null"`
	Wish        uint32       `gorm:"column:subject_wish;type:mediumint(8) unsigned;not null"`
	Done        uint32       `gorm:"column:subject_collect;type:mediumint(8) unsigned;not null"`
	Doing       uint32       `gorm:"column:subject_doing;type:mediumint(8) unsigned;not null"`
	OnHold      uint32       `gorm:"column:subject_on_hold;type:mediumint(8) unsigned;not null;comment:搁置人数"` // 搁置人数
	Dropped     uint32       `gorm:"column:subject_dropped;type:mediumint(8) unsigned;not null;comment:抛弃人数"` // 抛弃人数
	Series      bool         `gorm:"column:subject_series;type:tinyint(1) unsigned;not null"`
	SeriesEntry uint32       `gorm:"column:subject_series_entry;type:mediumint(8) unsigned;not null"`
	IdxCn       string       `gorm:"column:subject_idx_cn;type:varchar(1);not null"`
	Airtime     uint8        `gorm:"column:subject_airtime;type:tinyint(1) unsigned;not null"`
	Nsfw        bool         `gorm:"column:subject_nsfw;type:tinyint(1);not null"`
	Ban         uint8        `gorm:"column:subject_ban;type:tinyint(1) unsigned;not null"`
	Fields      SubjectField `gorm:"foreignKey:subject_id;references:field_sid" json:"fields"`
}

Subject mapped from table <chii_subjects>

func (*Subject) TableName

func (*Subject) TableName() string

TableName Subject's table name

type SubjectCollection

type SubjectCollection struct {
	ID           uint32                     `gorm:"column:interest_id;type:int(10) unsigned;primaryKey;autoIncrement:true"`
	UserID       uint32                     `gorm:"column:interest_uid;type:mediumint(8) unsigned;not null"`
	SubjectID    uint32                     `gorm:"column:interest_subject_id;type:mediumint(8) unsigned;not null"`
	SubjectType  uint8                      `gorm:"column:interest_subject_type;type:smallint(6) unsigned;not null"`
	Rate         uint8                      `gorm:"column:interest_rate;type:tinyint(3) unsigned;not null"`
	Type         uint8                      `gorm:"column:interest_type;type:tinyint(1) unsigned;not null"`
	HasComment   bool                       `gorm:"column:interest_has_comment;type:tinyint(1) unsigned;not null"`
	Comment      utiltype.HTMLEscapedString `gorm:"column:interest_comment;type:mediumtext;not null"`
	Tag          string                     `gorm:"column:interest_tag;type:mediumtext;not null"`
	EpStatus     uint32                     `gorm:"column:interest_ep_status;type:mediumint(8) unsigned;not null"`
	VolStatus    uint32                     `gorm:"column:interest_vol_status;type:mediumint(8) unsigned;not null;comment:卷数"` // 卷数
	WishTime     uint32                     `gorm:"column:interest_wish_dateline;type:int(10) unsigned;not null"`
	DoingTime    uint32                     `gorm:"column:interest_doing_dateline;type:int(10) unsigned;not null"`
	DoneTime     uint32                     `gorm:"column:interest_collect_dateline;type:int(10) unsigned;not null"`
	OnHoldTime   uint32                     `gorm:"column:interest_on_hold_dateline;type:int(10) unsigned;not null"`
	DroppedTime  uint32                     `gorm:"column:interest_dropped_dateline;type:int(10) unsigned;not null"`
	CreateIP     string                     `gorm:"column:interest_create_ip;type:char(15);not null"`
	LastUpdateIP string                     `gorm:"column:interest_lasttouch_ip;type:char(15);not null"`
	UpdatedTime  uint32                     `gorm:"column:interest_lasttouch;type:int(10) unsigned;not null"`
	Private      uint8                      `gorm:"column:interest_private;type:tinyint(1) unsigned;not null"`
}

SubjectCollection mapped from table <chii_subject_interests>

func (*SubjectCollection) TableName

func (*SubjectCollection) TableName() string

TableName SubjectCollection's table name

type SubjectField

type SubjectField struct {
	Sid      uint32    `gorm:"column:field_sid;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	Tid      uint16    `gorm:"column:field_tid;type:smallint(6) unsigned;not null"`
	Tags     []byte    `gorm:"column:field_tags;type:mediumtext;not null"`
	Rate1    uint32    `gorm:"column:field_rate_1;type:mediumint(8) unsigned;not null"`
	Rate2    uint32    `gorm:"column:field_rate_2;type:mediumint(8) unsigned;not null"`
	Rate3    uint32    `gorm:"column:field_rate_3;type:mediumint(8) unsigned;not null"`
	Rate4    uint32    `gorm:"column:field_rate_4;type:mediumint(8) unsigned;not null"`
	Rate5    uint32    `gorm:"column:field_rate_5;type:mediumint(8) unsigned;not null"`
	Rate6    uint32    `gorm:"column:field_rate_6;type:mediumint(8) unsigned;not null"`
	Rate7    uint32    `gorm:"column:field_rate_7;type:mediumint(8) unsigned;not null"`
	Rate8    uint32    `gorm:"column:field_rate_8;type:mediumint(8) unsigned;not null"`
	Rate9    uint32    `gorm:"column:field_rate_9;type:mediumint(8) unsigned;not null"`
	Rate10   uint32    `gorm:"column:field_rate_10;type:mediumint(8) unsigned;not null"`
	Airtime  uint8     `gorm:"column:field_airtime;type:tinyint(1) unsigned;not null"`
	Rank     uint32    `gorm:"column:field_rank;type:int(10) unsigned;not null"`
	Year     int32     `gorm:"column:field_year;type:year(4);not null;comment:放送年份"`            // 放送年份
	Mon      int8      `gorm:"column:field_mon;type:tinyint(2);not null;comment:放送月份"`          // 放送月份
	WeekDay  int8      `gorm:"column:field_week_day;type:tinyint(1);not null;comment:放送日(星期X)"` // 放送日(星期X)
	Date     time.Time `gorm:"column:field_date;type:date;not null;comment:放送日期"`               // 放送日期
	Redirect uint32    `gorm:"column:field_redirect;type:mediumint(8) unsigned;not null"`
}

SubjectField mapped from table <chii_subject_fields>

func (*SubjectField) TableName

func (*SubjectField) TableName() string

TableName SubjectField's table name

type SubjectRelation

type SubjectRelation struct {
	SubjectID            uint32  `gorm:"column:rlt_subject_id;type:mediumint(8) unsigned;primaryKey;comment:关联主 ID"` // 关联主 ID
	SubjectTypeID        uint8   `gorm:"column:rlt_subject_type_id;type:tinyint(3) unsigned;not null"`
	RelationType         uint16  `gorm:"column:rlt_relation_type;type:smallint(5) unsigned;not null;comment:关联类型"`            // 关联类型
	RelatedSubjectID     uint32  `gorm:"column:rlt_related_subject_id;type:mediumint(8) unsigned;primaryKey;comment:关联目标 ID"` // 关联目标 ID
	RelatedSubjectTypeID uint8   `gorm:"column:rlt_related_subject_type_id;type:tinyint(3) unsigned;not null;comment:关联目标类型"` // 关联目标类型
	ViceVersa            bool    `gorm:"column:rlt_vice_versa;type:tinyint(1) unsigned;primaryKey"`
	Order                uint8   `gorm:"column:rlt_order;type:tinyint(3) unsigned;not null;comment:关联排序"` // 关联排序
	Subject              Subject `gorm:"foreignKey:rlt_related_subject_id;references:subject_id" json:"subject"`
}

SubjectRelation mapped from table <chii_subject_relations>

func (*SubjectRelation) TableName

func (*SubjectRelation) TableName() string

TableName SubjectRelation's table name

type SubjectRevision

type SubjectRevision struct {
	ID           uint32  `gorm:"column:rev_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	Type         uint8   `gorm:"column:rev_type;type:tinyint(3) unsigned;not null;default:1;comment:修订类型"` // 修订类型
	SubjectID    uint32  `gorm:"column:rev_subject_id;type:mediumint(8) unsigned;not null"`
	TypeID       uint16  `gorm:"column:rev_type_id;type:smallint(6) unsigned;not null"`
	CreatorID    uint32  `gorm:"column:rev_creator;type:mediumint(8) unsigned;not null"`
	Dateline     uint32  `gorm:"column:rev_dateline;type:int(10) unsigned;not null"`
	Name         string  `gorm:"column:rev_name;type:varchar(80);not null"`
	NameCN       string  `gorm:"column:rev_name_cn;type:varchar(80);not null"`
	FieldInfobox string  `gorm:"column:rev_field_infobox;type:mediumtext;not null"`
	FieldSummary string  `gorm:"column:rev_field_summary;type:mediumtext;not null"`
	VoteField    string  `gorm:"column:rev_vote_field;type:mediumtext;not null"`
	FieldEps     uint32  `gorm:"column:rev_field_eps;type:mediumint(8) unsigned;not null"`
	EditSummary  string  `gorm:"column:rev_edit_summary;type:varchar(200);not null"`
	Platform     uint16  `gorm:"column:rev_platform;type:smallint(6) unsigned;not null"`
	Subject      Subject `gorm:"foreignKey:rev_subject_id;references:subject_id" json:"subject"`
}

SubjectRevision mapped from table <chii_subject_revisions>

func (*SubjectRevision) TableName

func (*SubjectRevision) TableName() string

TableName SubjectRevision's table name

type UserGroup

type UserGroup struct {
	ID       uint8  `gorm:"column:usr_grp_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true"`
	Name     string `gorm:"column:usr_grp_name;type:varchar(255);not null"`
	Perm     []byte `gorm:"column:usr_grp_perm;type:mediumtext;not null"`
	Dateline uint32 `gorm:"column:usr_grp_dateline;type:int(10) unsigned;not null"`
}

UserGroup mapped from table <chii_usergroup>

func (*UserGroup) TableName

func (*UserGroup) TableName() string

TableName UserGroup's table name

type WebSession

type WebSession struct {
	Key       string `gorm:"column:key;type:char(64);primaryKey;comment:session key"`                                          // session key
	UserID    uint32 `gorm:"column:user_id;type:int(10) unsigned;not null;comment:uint32 user id"`                             // uint32 user id
	Value     []byte `gorm:"column:value;type:mediumblob;not null;comment:json encoded session data"`                          // json encoded session data
	CreatedAt int64  `gorm:"column:created_at;type:bigint(20);not null;comment:int64 unix timestamp, when session is created"` // int64 unix timestamp, when session is created
	ExpiredAt int64  `gorm:"column:expired_at;type:bigint(20);not null;comment:int64 unix timestamp, when session is expired"` // int64 unix timestamp, when session is expired
}

WebSession mapped from table <chii_os_web_sessions>

func (*WebSession) TableName

func (*WebSession) TableName() string

TableName WebSession's table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL