-
Notifications
You must be signed in to change notification settings - Fork 61
/
chii_subject_relations.gen.go
28 lines (23 loc) · 1.43 KB
/
chii_subject_relations.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package dao
import (
"github.com/bangumi/server/internal/model"
)
const TableNameSubjectRelation = "chii_subject_relations"
// SubjectRelation mapped from table <chii_subject_relations>
type SubjectRelation struct {
SubjectID model.SubjectID `gorm:"column:rlt_subject_id;type:mediumint(8) unsigned;primaryKey"` // 关联主 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"` // 关联类型
RelatedSubjectID model.SubjectID `gorm:"column:rlt_related_subject_id;type:mediumint(8) unsigned;primaryKey"` // 关联目标 ID
RelatedSubjectTypeID uint8 `gorm:"column:rlt_related_subject_type_id;type:tinyint(3) unsigned;not null"` // 关联目标类型
ViceVersa bool `gorm:"column:rlt_vice_versa;type:tinyint(1) unsigned;primaryKey"`
Order uint8 `gorm:"column:rlt_order;type:tinyint(3) unsigned;not null"` // 关联排序
Subject Subject `gorm:"foreignKey:rlt_related_subject_id;references:subject_id" json:"subject"`
}
// TableName SubjectRelation's table name
func (*SubjectRelation) TableName() string {
return TableNameSubjectRelation
}