dao

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const FieldTypeCharacter = "crt"
View Source
const FieldTypePerson = "prsn"
View Source
const TableNameAccessToken = "chii_oauth_access_tokens"
View Source
const TableNameApp = "chii_apps"
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 TableNameEpisode = "chii_episodes"
View Source
const TableNameIndex = "chii_index"
View Source
const TableNameIndexSubject = "chii_index_related"
View Source
const TableNameMember = "chii_members"
View Source
const TableNameMemberField = "chii_memberfields"
View Source
const TableNameOAuthClient = "chii_oauth_clients"
View Source
const TableNamePerson = "chii_persons"
View Source
const TableNamePersonField = "chii_person_fields"
View Source
const TableNamePersonSubjects = "chii_person_cs_index"
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 added in v0.18.0

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

AccessToken mapped from table <chii_oauth_access_tokens>

func (*AccessToken) TableName added in v0.18.0

func (*AccessToken) TableName() string

TableName AccessToken's table name

type App added in v0.19.0

type App struct {
	ID          uint32 `gorm:"column:app_id;type:mediumint(8);primaryKey;autoIncrement:true" json:"app_id"`
	Type        uint8  `gorm:"column:app_type;type:tinyint(1);not null;index:app_type,priority:1" json:"app_type"`
	Creator     uint32 `gorm:"column:app_creator;type:mediumint(8);not null;index:app_type,priority:2" json:"app_creator"`
	Name        string `gorm:"column:app_name;type:varchar(255);not null" json:"app_name"`
	Description string `gorm:"column:app_desc;type:mediumtext;not null" json:"app_desc"`
	URL         string `gorm:"column:app_url;type:varchar(2000);not null" json:"app_url"`
	Collects    int32  `gorm:"column:app_collects;type:mediumint(8);not null" json:"app_collects"`
	Status      bool   `gorm:"column:app_status;type:tinyint(1);not null;index:app_status,priority:1" json:"app_status"`
	CreatedAt   int32  `gorm:"column:app_timestamp;type:int(10);not null" json:"app_timestamp"`
	UpdatedAt   int32  `gorm:"column:app_lasttouch;type:int(10);not null" json:"app_lasttouch"`
	Ban         bool   `gorm:"column:app_ban;type:tinyint(1);not null;index:app_ban,priority:1" json:"app_ban"`
}

App mapped from table <chii_apps>

func (*App) TableName added in v0.19.0

func (*App) TableName() string

TableName App's table name

type Cast

type Cast struct {
	CharacterID   uint32    `gorm:"column:crt_id;type:mediumint(9) unsigned;primaryKey" json:"crt_id"`
	PersonID      uint32    `gorm:"column:prsn_id;type:mediumint(9) unsigned;primaryKey;index:prsn_id,priority:1" json:"prsn_id"`
	SubjectID     uint32    `gorm:"column:subject_id;type:mediumint(9) unsigned;primaryKey;index:subject_id,priority:1" json:"subject_id"`
	SubjectTypeID uint8     `gorm:"column:subject_type_id;type:tinyint(3) unsigned;not null;index:subject_type_id,priority:1" json:"subject_type_id"` // 根据人物归类查询角色,动画,书籍,游戏
	Summary       string    `gorm:"column:summary;type:varchar(255);not null" json:"summary"`                                                         // 幼年,男乱马,女乱马,变身形态,少女形态。。
	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" json:"crt_id"`
	Name     string      `gorm:"column:crt_name;type:varchar(255);not null" json:"crt_name"`
	Role     uint8       `gorm:"column:crt_role;type:tinyint(4) unsigned;not null;index:crt_role,priority:1" json:"crt_role"` // 角色,机体,组织。。
	Infobox  string      `gorm:"column:crt_infobox;type:mediumtext;not null" json:"crt_infobox"`
	Summary  string      `gorm:"column:crt_summary;type:mediumtext;not null" json:"crt_summary"`
	Img      string      `gorm:"column:crt_img;type:varchar(255);not null" json:"crt_img"`
	Comment  uint32      `gorm:"column:crt_comment;type:mediumint(9) unsigned;not null" json:"crt_comment"`
	Collects uint32      `gorm:"column:crt_collects;type:mediumint(8) unsigned;not null" json:"crt_collects"`
	Dateline uint32      `gorm:"column:crt_dateline;type:int(10) unsigned;not null" json:"crt_dateline"`
	Lastpost uint32      `gorm:"column:crt_lastpost;type:int(11) unsigned;not null" json:"crt_lastpost"`
	Lock     int8        `gorm:"column:crt_lock;type:tinyint(4);not null;index:crt_lock,priority:1" json:"crt_lock"`
	ImgAnidb string      `gorm:"column:crt_img_anidb;type:varchar(255);not null" json:"crt_img_anidb"`
	AnidbID  uint32      `gorm:"column:crt_anidb_id;type:mediumint(8) unsigned;not null" json:"crt_anidb_id"`
	Ban      uint8       `gorm:"column:crt_ban;type:tinyint(3) unsigned;not null;index:crt_ban,priority:1" json:"crt_ban"`
	Redirect uint32      `gorm:"column:crt_redirect;type:int(10) unsigned;not null" json:"crt_redirect"`
	Nsfw     bool        `gorm:"column:crt_nsfw;type:tinyint(1) unsigned;not null" json:"crt_nsfw"`
	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" json:"crt_id"`
	SubjectID     uint32    `gorm:"column:subject_id;type:mediumint(9) unsigned;primaryKey;index:subject_id,priority:1" json:"subject_id"`
	SubjectTypeID uint8     `gorm:"column:subject_type_id;type:tinyint(4) unsigned;not null;index:subject_type_id,priority:1" json:"subject_type_id"`
	CrtType       uint8     `gorm:"column:crt_type;type:tinyint(4) unsigned;not null;index:crt_type,priority:1" json:"crt_type"` // 主角,配角
	CtrAppearEps  string    `gorm:"column:ctr_appear_eps;type:mediumtext;not null" json:"ctr_appear_eps"`                        // 可选,角色出场的的章节
	CrtOrder      uint8     `gorm:"column:crt_order;type:tinyint(3) unsigned;not null" json:"crt_order"`
	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 Episode

type Episode struct {
	ID        uint32  `gorm:"column:ep_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true" json:"ep_id"`
	SubjectID uint32  `` /* 148-byte string literal not displayed */
	Sort      float32 `gorm:"column:ep_sort;type:float unsigned;not null;index:ep_sort,priority:1;index:ep_subject_id_2,priority:3" json:"ep_sort"`
	Type      int16   `gorm:"column:ep_type;type:tinyint(1) unsigned;not null" json:"ep_type"`
	Disc      uint8   `gorm:"column:ep_disc;type:tinyint(3) unsigned;not null;index:ep_disc,priority:1" json:"ep_disc"` // 碟片数
	Name      string  `gorm:"column:ep_name;type:varchar(80);not null" json:"ep_name"`
	NameCn    string  `gorm:"column:ep_name_cn;type:varchar(80);not null" json:"ep_name_cn"`
	Rate      int8    `gorm:"column:ep_rate;type:tinyint(3);not null" json:"ep_rate"`
	Duration  string  `gorm:"column:ep_duration;type:varchar(80);not null" json:"ep_duration"`
	Airdate   string  `gorm:"column:ep_airdate;type:varchar(80);not null" json:"ep_airdate"`
	Online    string  `gorm:"column:ep_online;type:mediumtext;not null" json:"ep_online"`
	Comment   uint32  `gorm:"column:ep_comment;type:mediumint(8) unsigned;not null" json:"ep_comment"`
	Resources uint32  `gorm:"column:ep_resources;type:mediumint(8) unsigned;not null" json:"ep_resources"`
	Desc      string  `gorm:"column:ep_desc;type:mediumtext;not null" json:"ep_desc"`
	Dateline  uint32  `gorm:"column:ep_dateline;type:int(10) unsigned;not null" json:"ep_dateline"`
	Lastpost  uint32  `gorm:"column:ep_lastpost;type:int(10) unsigned;not null;index:ep_lastpost,priority:1" json:"ep_lastpost"`
	Lock      uint8   `gorm:"column:ep_lock;type:tinyint(3) unsigned;not null" json:"ep_lock"`
	Ban       uint8   `gorm:"column:ep_ban;type:tinyint(3) unsigned;not null;index:ep_ban,priority:1;index:ep_subject_id_2,priority:2" json:"ep_ban"`
	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 Index

type Index struct {
	ID           uint32 `gorm:"column:idx_id;type:mediumint(8);primaryKey;autoIncrement:true;uniqueIndex:mid,priority:1" json:"idx_id"` // 自动id
	Type         uint8  `gorm:"column:idx_type;type:tinyint(3) unsigned;not null;index:idx_type,priority:1" json:"idx_type"`
	Title        string `gorm:"column:idx_title;type:varchar(80);not null" json:"idx_title"`                                      // 标题
	Desc         string `gorm:"column:idx_desc;type:mediumtext;not null" json:"idx_desc"`                                         // 简介
	Replies      uint32 `gorm:"column:idx_replies;type:mediumint(8) unsigned;not null" json:"idx_replies"`                        // 回复数
	SubjectTotal uint32 `gorm:"column:idx_subject_total;type:mediumint(8) unsigned;not null" json:"idx_subject_total"`            // 内含条目总数
	Collects     uint32 `gorm:"column:idx_collects;type:mediumint(8);not null;index:idx_collects,priority:1" json:"idx_collects"` // 收藏数
	Stats        string `gorm:"column:idx_stats;type:mediumtext;not null" json:"idx_stats"`
	Dateline     int32  `gorm:"column:idx_dateline;type:int(10);not null" json:"idx_dateline"` // 创建时间
	Lasttouch    uint32 `gorm:"column:idx_lasttouch;type:int(10) unsigned;not null" json:"idx_lasttouch"`
	UID          uint32 `gorm:"column:idx_uid;type:mediumint(8);not null;index:idx_uid,priority:1" json:"idx_uid"` // 创建人UID
	Ban          bool   `gorm:"column:idx_ban;type:tinyint(1) unsigned;not null;index:idx_ban,priority:1" json:"idx_ban"`
}

Index mapped from table <chii_index>

func (*Index) TableName

func (*Index) TableName() string

TableName Index's table name

type IndexSubject

type IndexSubject struct {
	ID  uint32 `gorm:"column:idx_rlt_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true" json:"idx_rlt_id"`
	Cat int8   `gorm:"column:idx_rlt_cat;type:tinyint(3);not null;index:idx_rlt_cat,priority:1;index:idx_order,priority:2" json:"idx_rlt_cat"`
	Rid uint32 `` // 关联目录
	/* 165-byte string literal not displayed */
	Type uint8  `gorm:"column:idx_rlt_type;type:smallint(6) unsigned;not null;index:idx_rlt_rid,priority:2" json:"idx_rlt_type"` // 关联条目类型
	Sid  uint32 ``                                                                                                               // 关联条目ID
	/* 167-byte string literal not displayed */
	Order    uint32  `gorm:"column:idx_rlt_order;type:mediumint(8) unsigned;not null;index:idx_order,priority:3" json:"idx_rlt_order"`
	Comment  string  `gorm:"column:idx_rlt_comment;type:mediumtext;not null" json:"idx_rlt_comment"`
	Dateline uint32  `gorm:"column:idx_rlt_dateline;type:int(10) unsigned;not null" json:"idx_rlt_dateline"`
	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 {
	UID           uint32      `gorm:"column:uid;type:mediumint(8) unsigned;primaryKey;autoIncrement:true" json:"uid"`
	Username      string      `gorm:"column:username;type:char(15);not null;uniqueIndex:username,priority:1" json:"username"`
	Nickname      string      `gorm:"column:nickname;type:varchar(30);not null" json:"nickname"`
	Avatar        string      `gorm:"column:avatar;type:varchar(255);not null" json:"avatar"`
	Groupid       uint8       `gorm:"column:groupid;type:smallint(6) unsigned;not null" json:"groupid"`
	Regdate       int64       `gorm:"column:regdate;type:int(10) unsigned;not null" json:"regdate"`
	Lastvisit     uint32      `gorm:"column:lastvisit;type:int(10) unsigned;not null" json:"lastvisit"`
	Lastactivity  uint32      `gorm:"column:lastactivity;type:int(10) unsigned;not null" json:"lastactivity"`
	Lastpost      uint32      `gorm:"column:lastpost;type:int(10) unsigned;not null" json:"lastpost"`
	Dateformat    string      `gorm:"column:dateformat;type:char(10);not null" json:"dateformat"`
	Timeformat    bool        `gorm:"column:timeformat;type:tinyint(1);not null" json:"timeformat"`
	Timeoffset    string      `gorm:"column:timeoffset;type:char(4);not null" json:"timeoffset"`
	Newpm         bool        `gorm:"column:newpm;type:tinyint(1);not null" json:"newpm"`
	NewNotify     uint16      `gorm:"column:new_notify;type:smallint(6) unsigned;not null" json:"new_notify"` // 新提醒
	Sign          string      `gorm:"column:sign;type:varchar(255);not null" json:"sign"`
	PasswordCrypt []byte      `gorm:"column:password_crypt;type:char(64);not null" json:"password_crypt"`
	Email         string      `gorm:"column:email;type:char(50);not null" json:"email"`
	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" json:"uid"`
	Site      string `gorm:"column:site;type:varchar(75);not null" json:"site"`
	Location  string `gorm:"column:location;type:varchar(30);not null" json:"location"`
	Bio       string `gorm:"column:bio;type:text;not null" json:"bio"`
	Privacy   string `gorm:"column:privacy;type:mediumtext;not null" json:"privacy"`
	Blocklist string `gorm:"column:blocklist;type:mediumtext;not null" json:"blocklist"`
}

MemberField mapped from table <chii_memberfields>

func (*MemberField) TableName

func (*MemberField) TableName() string

TableName MemberField's table name

type OAuthClient added in v0.19.0

type OAuthClient struct {
	AppID        uint32 `gorm:"column:app_id;type:mediumint(8);primaryKey" json:"app_id"`
	ClientID     string `gorm:"column:client_id;type:varchar(80);not null;index:client_id,priority:1" json:"client_id"`
	ClientSecret string `gorm:"column:client_secret;type:varchar(80)" json:"client_secret"`
	RedirectURI  string `gorm:"column:redirect_uri;type:varchar(2000)" json:"redirect_uri"`
	GrantTypes   string `gorm:"column:grant_types;type:varchar(80)" json:"grant_types"`
	Scope        string `gorm:"column:scope;type:varchar(4000)" json:"scope"`
	UserID       string `gorm:"column:user_id;type:varchar(80)" json:"user_id"`
	App          App    `gorm:"foreignKey:app_id;references:app_id" json:"app"`
}

OAuthClient mapped from table <chii_oauth_clients>

func (*OAuthClient) TableName added in v0.19.0

func (*OAuthClient) TableName() string

TableName OAuthClient's table name

type Person

type Person struct {
	ID          uint32      `gorm:"column:prsn_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true" json:"prsn_id"`
	Name        string      `gorm:"column:prsn_name;type:varchar(255);not null" json:"prsn_name"`
	Type        uint8       `gorm:"column:prsn_type;type:tinyint(4) unsigned;not null;index:prsn_type,priority:1" json:"prsn_type"` // 个人,公司,组合
	Infobox     string      `gorm:"column:prsn_infobox;type:mediumtext;not null" json:"prsn_infobox"`
	Producer    bool        `gorm:"column:prsn_producer;type:tinyint(1);not null;index:prsn_producer,priority:1" json:"prsn_producer"`
	Mangaka     bool        `gorm:"column:prsn_mangaka;type:tinyint(1);not null;index:prsn_mangaka,priority:1" json:"prsn_mangaka"`
	Artist      bool        `gorm:"column:prsn_artist;type:tinyint(1);not null;index:prsn_artist,priority:1" json:"prsn_artist"`
	Seiyu       bool        `gorm:"column:prsn_seiyu;type:tinyint(1);not null;index:prsn_seiyu,priority:1" json:"prsn_seiyu"`
	Writer      bool        `gorm:"column:prsn_writer;type:tinyint(4);not null;index:prsn_writer,priority:1" json:"prsn_writer"`                // 作家
	Illustrator bool        `gorm:"column:prsn_illustrator;type:tinyint(4);not null;index:prsn_illustrator,priority:1" json:"prsn_illustrator"` // 绘师
	Actor       bool        `gorm:"column:prsn_actor;type:tinyint(1);not null;index:prsn_actor,priority:1" json:"prsn_actor"`                   // 演员
	Summary     string      `gorm:"column:prsn_summary;type:mediumtext;not null" json:"prsn_summary"`
	Img         string      `gorm:"column:prsn_img;type:varchar(255);not null" json:"prsn_img"`
	ImgAnidb    string      `gorm:"column:prsn_img_anidb;type:varchar(255);not null" json:"prsn_img_anidb"`
	Comment     uint32      `gorm:"column:prsn_comment;type:mediumint(9) unsigned;not null" json:"prsn_comment"`
	Collects    uint32      `gorm:"column:prsn_collects;type:mediumint(8) unsigned;not null" json:"prsn_collects"`
	Dateline    uint32      `gorm:"column:prsn_dateline;type:int(10) unsigned;not null" json:"prsn_dateline"`
	Lastpost    uint32      `gorm:"column:prsn_lastpost;type:int(11) unsigned;not null" json:"prsn_lastpost"`
	Lock        int8        `gorm:"column:prsn_lock;type:tinyint(4);not null;index:prsn_lock,priority:1" json:"prsn_lock"`
	AnidbID     uint32      `gorm:"column:prsn_anidb_id;type:mediumint(8) unsigned;not null" json:"prsn_anidb_id"`
	Ban         uint8       `gorm:"column:prsn_ban;type:tinyint(3) unsigned;not null;index:prsn_ban,priority:1" json:"prsn_ban"`
	Redirect    uint32      `gorm:"column:prsn_redirect;type:int(10) unsigned;not null" json:"prsn_redirect"`
	Nsfw        bool        `gorm:"column:prsn_nsfw;type:tinyint(1) unsigned;not null" json:"prsn_nsfw"`
	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" json:"prsn_cat"`
	OwnerID   uint32 `gorm:"column:prsn_id;type:int(8) unsigned;primaryKey;index:prsn_id,priority:1" json:"prsn_id"`
	Gender    uint8  `gorm:"column:gender;type:tinyint(4) unsigned;not null" json:"gender"`
	Bloodtype uint8  `gorm:"column:bloodtype;type:tinyint(4) unsigned;not null" json:"bloodtype"`
	BirthYear uint16 `gorm:"column:birth_year;type:year(4);not null" json:"birth_year"`
	BirthMon  uint8  `gorm:"column:birth_mon;type:tinyint(2) unsigned;not null" json:"birth_mon"`
	BirthDay  uint8  `gorm:"column:birth_day;type:tinyint(2) unsigned;not null" json:"birth_day"`
}

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" json:"prsn_type"`
	PersonID      uint32  `gorm:"column:prsn_id;type:mediumint(9) unsigned;primaryKey;index:prsn_id,priority:1" json:"prsn_id"`
	PrsnPosition  uint16  `gorm:"column:prsn_position;type:smallint(5) unsigned;primaryKey;index:prsn_position,priority:1" json:"prsn_position"` // 监督,原案,脚本,..
	SubjectID     uint32  `gorm:"column:subject_id;type:mediumint(9) unsigned;primaryKey;index:subject_id,priority:1" json:"subject_id"`
	SubjectTypeID uint8   `gorm:"column:subject_type_id;type:tinyint(4) unsigned;not null;index:subject_type_id,priority:1" json:"subject_type_id"`
	Summary       string  `gorm:"column:summary;type:mediumtext;not null" json:"summary"`
	PrsnAppearEps string  `gorm:"column:prsn_appear_eps;type:mediumtext;not null" json:"prsn_appear_eps"` // 可选,人物参与的章节
	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 RevisionHistory added in v0.10.1

type RevisionHistory struct {
	ID        uint32 `gorm:"column:rev_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true;index:rev_id,priority:1" json:"rev_id"`
	Type      uint8  `gorm:"column:rev_type;type:tinyint(3) unsigned;not null;index:rev_crt_id,priority:1;index:rev_id,priority:2" json:"rev_type"` // 条目,角色,人物
	Mid       uint32 `gorm:"column:rev_mid;type:mediumint(8) unsigned;not null;index:rev_crt_id,priority:2" json:"rev_mid"`                         // 对应条目,人物的ID
	TextID    uint32 `gorm:"column:rev_text_id;type:mediumint(9) unsigned;not null" json:"rev_text_id"`
	CreatedAt uint32 `gorm:"column:rev_dateline;type:int(10) unsigned;not null" json:"rev_dateline"`
	CreatorID uint32 `` /* 137-byte string literal not displayed */
	Summary   string `gorm:"column:rev_edit_summary;type:varchar(200);not null" json:"rev_edit_summary"`
}

RevisionHistory mapped from table <chii_rev_history>

func (*RevisionHistory) TableName added in v0.10.1

func (*RevisionHistory) TableName() string

TableName RevisionHistory's table name

type RevisionText added in v0.10.1

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

RevisionText mapped from table <chii_rev_text>

func (*RevisionText) TableName added in v0.10.1

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" json:"subject_id"`
	TypeID      uint8        `` /* 208-byte string literal not displayed */
	Name        string       `` /* 133-byte string literal not displayed */
	NameCN      string       `gorm:"column:subject_name_cn;type:varchar(80);not null;index:subject_name_cn,priority:1" json:"subject_name_cn"`
	UID         string       `gorm:"column:subject_uid;type:varchar(20);not null" json:"subject_uid"` // isbn / imdb
	Creator     uint32       `gorm:"column:subject_creator;type:mediumint(8) unsigned;not null;index:subject_creator,priority:1" json:"subject_creator"`
	Dateline    uint32       `gorm:"column:subject_dateline;type:int(10) unsigned;not null" json:"subject_dateline"`
	Image       string       `gorm:"column:subject_image;type:varchar(255);not null" json:"subject_image"`
	Platform    uint16       `` /* 179-byte string literal not displayed */
	Infobox     string       `gorm:"column:field_infobox;type:mediumtext;not null" json:"field_infobox"`
	Summary     string       `gorm:"column:field_summary;type:mediumtext;not null" json:"field_summary"`            // summary
	Field5      string       `gorm:"column:field_5;type:mediumtext;not null" json:"field_5"`                        // author summary
	Volumes     uint32       `gorm:"column:field_volumes;type:mediumint(8) unsigned;not null" json:"field_volumes"` // 卷数
	Eps         uint32       `gorm:"column:field_eps;type:mediumint(8) unsigned;not null" json:"field_eps"`
	Wish        uint32       `gorm:"column:subject_wish;type:mediumint(8) unsigned;not null" json:"subject_wish"`
	Collect     uint32       `gorm:"column:subject_collect;type:mediumint(8) unsigned;not null" json:"subject_collect"`
	Doing       uint32       `gorm:"column:subject_doing;type:mediumint(8) unsigned;not null" json:"subject_doing"`
	OnHold      uint32       `gorm:"column:subject_on_hold;type:mediumint(8) unsigned;not null" json:"subject_on_hold"` // 搁置人数
	Dropped     uint32       `gorm:"column:subject_dropped;type:mediumint(8) unsigned;not null" json:"subject_dropped"` // 抛弃人数
	Series      bool         ``                                                                                         /* 172-byte string literal not displayed */
	SeriesEntry uint32       ``                                                                                         /* 136-byte string literal not displayed */
	IdxCn       string       `gorm:"column:subject_idx_cn;type:varchar(1);not null;index:subject_idx_cn,priority:1" json:"subject_idx_cn"`
	Airtime     uint8        `gorm:"column:subject_airtime;type:tinyint(1) unsigned;not null;index:subject_airtime,priority:1" json:"subject_airtime"`
	Nsfw        bool         `gorm:"column:subject_nsfw;type:tinyint(1);not null;index:subject_nsfw,priority:1" json:"subject_nsfw"`
	Ban         uint8        `` /* 163-byte string literal not displayed */
	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" json:"interest_id"`
	UID             uint32 `` /* 378-byte string literal not displayed */
	SubjectID       uint32 `` /* 369-byte string literal not displayed */
	SubjectType     uint8  `` /* 302-byte string literal not displayed */
	Rate            uint8  `` /* 143-byte string literal not displayed */
	Type            uint8  `` /* 320-byte string literal not displayed */
	HasComment      bool   `` /* 129-byte string literal not displayed */
	Comment         string `gorm:"column:interest_comment;type:mediumtext;not null" json:"interest_comment"`
	Tag             string `gorm:"column:interest_tag;type:mediumtext;not null" json:"interest_tag"`
	EpStatus        uint32 `gorm:"column:interest_ep_status;type:mediumint(8) unsigned;not null" json:"interest_ep_status"`
	VolStatus       uint32 `gorm:"column:interest_vol_status;type:mediumint(8) unsigned;not null" json:"interest_vol_status"` // 卷数
	WishDateline    uint32 `gorm:"column:interest_wish_dateline;type:int(10) unsigned;not null" json:"interest_wish_dateline"`
	DoingDateline   uint32 `` /* 128-byte string literal not displayed */
	CollectDateline uint32 `` /* 214-byte string literal not displayed */
	OnHoldDateline  uint32 `gorm:"column:interest_on_hold_dateline;type:int(10) unsigned;not null" json:"interest_on_hold_dateline"`
	DroppedDateline uint32 `gorm:"column:interest_dropped_dateline;type:int(10) unsigned;not null" json:"interest_dropped_dateline"`
	Lasttouch       uint32 `` /* 225-byte string literal not displayed */
	Private         uint8  `` /* 386-byte string literal not displayed */
}

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;index:query_date,priority:1" json:"field_sid"`
	Tid      uint16    `gorm:"column:field_tid;type:smallint(6) unsigned;not null;index:sort_id,priority:1" json:"field_tid"`
	Tags     []byte    `gorm:"column:field_tags;type:mediumtext;not null" json:"field_tags"`
	Rate1    uint32    `gorm:"column:field_rate_1;type:mediumint(8) unsigned;not null" json:"field_rate_1"`
	Rate2    uint32    `gorm:"column:field_rate_2;type:mediumint(8) unsigned;not null" json:"field_rate_2"`
	Rate3    uint32    `gorm:"column:field_rate_3;type:mediumint(8) unsigned;not null" json:"field_rate_3"`
	Rate4    uint32    `gorm:"column:field_rate_4;type:mediumint(8) unsigned;not null" json:"field_rate_4"`
	Rate5    uint32    `gorm:"column:field_rate_5;type:mediumint(8) unsigned;not null" json:"field_rate_5"`
	Rate6    uint32    `gorm:"column:field_rate_6;type:mediumint(8) unsigned;not null" json:"field_rate_6"`
	Rate7    uint32    `gorm:"column:field_rate_7;type:mediumint(8) unsigned;not null" json:"field_rate_7"`
	Rate8    uint32    `gorm:"column:field_rate_8;type:mediumint(8) unsigned;not null" json:"field_rate_8"`
	Rate9    uint32    `gorm:"column:field_rate_9;type:mediumint(8) unsigned;not null" json:"field_rate_9"`
	Rate10   uint32    `gorm:"column:field_rate_10;type:mediumint(8) unsigned;not null" json:"field_rate_10"`
	Airtime  uint8     `gorm:"column:field_airtime;type:tinyint(1) unsigned;not null;index:subject_airtime,priority:1" json:"field_airtime"`
	Rank     uint32    `gorm:"column:field_rank;type:int(10) unsigned;not null;index:field_rank,priority:1" json:"field_rank"`
	Year     int32     `gorm:"column:field_year;type:year(4);not null;index:field_year_mon,priority:1;index:field_year,priority:1" json:"field_year"` // 放送年份
	Mon      int8      `gorm:"column:field_mon;type:tinyint(2);not null;index:field_year_mon,priority:2" json:"field_mon"`                            // 放送月份
	WeekDay  int8      `gorm:"column:field_week_day;type:tinyint(1);not null" json:"field_week_day"`                                                  // 放送日(星期X)
	Date     time.Time `gorm:"column:field_date;type:date;not null;index:field_date,priority:1;index:query_date,priority:2" json:"field_date"`        // 放送日期
	Redirect uint32    `gorm:"column:field_redirect;type:mediumint(8) unsigned;not null" json:"field_redirect"`
}

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 `` // 关联主 ID
	/* 161-byte string literal not displayed */
	SubjectTypeID uint8  `` /* 131-byte string literal not displayed */
	RelationType  uint16 `` // 关联类型
	/* 126-byte string literal not displayed */
	RelatedSubjectID uint32 `` // 关联目标 ID
	/* 177-byte string literal not displayed */
	RelatedSubjectTypeID uint8 `` // 关联目标类型
	/* 155-byte string literal not displayed */
	ViceVersa bool    `gorm:"column:rlt_vice_versa;type:tinyint(1) unsigned;primaryKey;uniqueIndex:rlt_subject_id,priority:3" json:"rlt_vice_versa"`
	Order     uint8   `gorm:"column:rlt_order;type:tinyint(3) unsigned;not null;index:rlt_related_subject_type_id,priority:2" json:"rlt_order"` // 关联排序
	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;index:rev_creator,priority:2" json:"rev_id"`
	Type         uint8   `gorm:"column:rev_type;type:tinyint(3) unsigned;not null;index:rev_type,priority:1;default:1" json:"rev_type"` // 修订类型
	SubjectID    uint32  `gorm:"column:rev_subject_id;type:mediumint(8) unsigned;not null;index:rev_subject_id,priority:1" json:"rev_subject_id"`
	TypeID       uint16  `gorm:"column:rev_type_id;type:smallint(6) unsigned;not null" json:"rev_type_id"`
	Creator      uint32  `` /* 141-byte string literal not displayed */
	Dateline     uint32  `gorm:"column:rev_dateline;type:int(10) unsigned;not null;index:rev_dateline,priority:1" json:"rev_dateline"`
	Name         string  `gorm:"column:rev_name;type:varchar(80);not null" json:"rev_name"`
	NameCN       string  `gorm:"column:rev_name_cn;type:varchar(80);not null" json:"rev_name_cn"`
	FieldInfobox string  `gorm:"column:rev_field_infobox;type:mediumtext;not null" json:"rev_field_infobox"`
	FieldSummary string  `gorm:"column:rev_field_summary;type:mediumtext;not null" json:"rev_field_summary"`
	VoteField    string  `gorm:"column:rev_vote_field;type:mediumtext;not null" json:"rev_vote_field"`
	FieldEps     uint32  `gorm:"column:rev_field_eps;type:mediumint(8) unsigned;not null" json:"rev_field_eps"`
	EditSummary  string  `gorm:"column:rev_edit_summary;type:varchar(200);not null" json:"rev_edit_summary"`
	Platform     uint16  `gorm:"column:rev_platform;type:smallint(6) unsigned;not null" json:"rev_platform"`
	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 added in v0.12.4

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

UserGroup mapped from table <chii_usergroup>

func (*UserGroup) TableName added in v0.12.4

func (*UserGroup) TableName() string

TableName UserGroup's table name

type WebSession added in v0.12.4

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

WebSession mapped from table <chii_os_web_sessions>

func (*WebSession) TableName added in v0.12.4

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