fonchain-artistinfo/cmd/model/artworkStatement.go
2023-03-22 16:16:16 +08:00

40 lines
2.3 KiB
Go

package model
// 对账单委托画作批次
type StatementBatch struct {
Model
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单表的唯一表示;NOT NULL" json:"uid"`
StType int32 `gorm:"column:st_type;unqiueIndex:sttype_uid_batchtime_idx;comment:对账单类型 1=版权 2=物权;"`
ArtistUid string `gorm:"column:artist_uid;unqiueIndex:sttype_uid_batchtime_idx;comment:画家uid"`
ArtistName string `gorm:"column:artist_name;comment:画家姓名;"`
BatchTime string `gorm:"column:batch_time;unqiueIndex:sttype_uid_batchtime_idx;comment:批次时间;"`
FlowStatus int32 `gorm:"column:flow_status;default:1;comment:流程状态 1=未生成 2=已生成未签署 3=已签署"`
ViewUrl string `gorm:"column:view_url;type:varchar(500);comment:在线查看对账单链接" json:"view_url"`
DownloadUrl string `gorm:"column:download_url;type:varchar(500);comment:对账单下载链接" json:"download_url"`
BatchId int64 `gorm:"column:batch_id;unqiueIndex:batchid_tfnum_idx;comment:批次id;"`
EntrustList []ArtworkStatementDetail `gorm:"foreignKey:BatchId;references:ID"` //当前批次的委托单详情
}
func (StatementBatch) TableName() string {
return "statement_batch"
}
// // 对账单画作委托详情
// type ArtworkStatementDetail struct {
// Model
// Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作详情表的唯一表示;NOT NULL" json:"uid"`
// BatchId int64 `gorm:"column:batch_id;unqiueIndex:batchid_tfnum_idx;comment:批次id;"`
// TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"`
// ArtworkName string `gorm:"column:artwork_name;comment:画作名称"`
// Ruler string `gorm:"column:ruler;comment:平尺"`
// SaleNo string `gorm:"column:sale_no;comment:销售单号"`
// CompleteDate string `gorm:"column:complete_date;comment:成交日期"`
// MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"`
// GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;"`
// }
// func (ArtworkStatementDetail) TableName() string {
// return "artwork_statement_detail"
// }