package models import "time" // Product 结构体 type ProductV2 struct { ID int `json:"id" gorm:"id"` ProjectName string `json:"project_name" form:"project_name" gorm:"column:project_name;comment:项目名称;size:64;"` ProjectLabel string `json:"project_label" form:"project_label" gorm:"column:project_label;comment:唯一且仅英文;size:32;"` ExtId string `json:"project_ext_id" form:"project_ext_id" gorm:"column:project_ext_id;comment:例如teambition项目Id;"` ProductLine string `json:"product_line" form:"product_line" gorm:"column:product_line;comment:不同环境的产品需要放在同一个产品线中;"` ProductName string `json:"product_name" form:"product_name" gorm:"column:product_name;comment:;size:32;"` ProductLabel string `json:"product_label" form:"product_label" gorm:"column:product_label;comment:唯一,用英文小写定义;"` PackageName string `json:"package_name" form:"package_name" gorm:"column:package_name;comment:;"` Platform string `json:"platform" form:"platform" gorm:"column:platform;comment:adr/ios/web等等;size:32;"` Status int `json:"status" form:"status" gorm:"column:status;comment:预留状态字段;"` } // TableName Product 表名 func (ProductV2) TableName() string { return "product" } // QaProduct 结构体 type QaProduct struct { ID uint `gorm:"column:id"` // 主键ID CreatedAt time.Time `json:"created_at" gorm:"column:created_at;autoCreateTime;comment:创建时间"` // 创建时间 UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;autoUpdateTime;comment:更新时间"` // 更新时间 Name string `json:"name" form:"name" gorm:"column:name;comment:;"` Label string `json:"label" form:"label" gorm:"column:label;comment:唯一,用英文小写定义;"` ProjectId int `json:"project_id" form:"project_id" gorm:"column:project_id;comment:;"` ProjectExtId string `json:"project_ext_id" form:"project_ext_id" gorm:"column:project_ext_id;comment:;"` Status int `json:"status" form:"status" gorm:"column:status;comment:预留状态字段;"` Remark string `json:"remark" form:"remark" gorm:"column:remark;comment:;"` Mapping string `json:"mapping" form:"mapping" gorm:"column:mapping;comment:用字典json存放其它属性;"` } // TableName QaProduct 表名 func (QaProduct) TableName() string { return "qa_products" }