12345678910111213141516171819202122232425262728293031 |
- package model
- type Plan struct {
- Id string `json:"id" gorm:"type:varchar(128);not null"`
- Title string `json:"title" gorm:"type:varchar(30);not null"`
- Version string `json:"version" gorm:"type:varchar(20);not null"`
- State int `json:"state" gorm:"type:int; not null"`
- Description string `json:"description" gorm:"type:longtext;not null"`
- StatementFile string `json:"statementFile" gorm:"column:statement_file;type:longtext;not null"`
- Delete int `json:"delete" gorm:"type:tinyint(1);not null"`
- CreatorId string `json:"creatorId" gorm:"column:creator_id;type:varchar(128);not null"`
- SoftwareId string `json:"softwareId" gorm:"column:software_id;type:varchar(128);not null"`
- Type string `json:"type" gorm:"type:varchar(20);not null"`
- CreatedAt Time `json:"created_at" gorm:"column:create_time;type:datetime default CURRENT_TIMESTAMP"`
- UpdatedAt Time `json:"updated_at" gorm:"column:update_time;type:datetime default CURRENT_TIMESTAMP"`
- CompanyId int `json:"company_id" gorm:"column:company_id;type:bigint(20)"`
- }
- func (Plan) TableName() string {
- return "plan"
- }
- type Plan2Group struct {
- ID uint `gorm:"primary_key;type:int(11) auto_increment"`
- PlanId string `gorm:"column:plan_id"`
- GroupId string `gorm:"column:group_id"`
- }
- func (Plan2Group) TableName() string {
- return "plan_groups"
- }
|