完成对账单的表结构定义
This commit is contained in:
parent
c6475d50e1
commit
9eb0effc64
33
cmd/model/artworkStatement.go
Normal file
33
cmd/model/artworkStatement.go
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// 对账单批次
|
||||||
|
type StatementBatch struct {
|
||||||
|
Model
|
||||||
|
StType int32 `gorm:"column:st_type;comment:对账单类型 1=版权 2=物权;"`
|
||||||
|
ArtistUid string `gorm:"column:artist_uid;comment:画家uid"`
|
||||||
|
ArtistRealName string `gorm:"column:artist_real_name;comment:画家真实姓名;"`
|
||||||
|
FlowStatus int32 `gorm:"column:flow_status;comment:流程状态 1=未生成 2=已生成未签署 3=已签署"`
|
||||||
|
BatchTime string `gorm:"column:batch_time;comment:批次时间;"`
|
||||||
|
MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"`
|
||||||
|
GuaranteePrice float32 `gorm:"column:guarantee_price;comment:以收取保证金;"`
|
||||||
|
ArtworkList []StatementDetail `gorm:"foreignKey:BatchId"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (StatementBatch) TableName() string {
|
||||||
|
return "statement_batch"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 对账单批次详情
|
||||||
|
type StatementDetail struct {
|
||||||
|
Model
|
||||||
|
BatchId int64 `gorm:"column:batch_id,comment:批次id;"`
|
||||||
|
TfNum string `gorm:"column:tf_num;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:成交日期"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (StatementDetail) TableName() string {
|
||||||
|
return "statement_detail"
|
||||||
|
}
|
@ -123,6 +123,8 @@ func migration() {
|
|||||||
&model.ArtshowArtistIndex{}, //画展-画家指数
|
&model.ArtshowArtistIndex{}, //画展-画家指数
|
||||||
&model.ArtshowArtistSupplement{}, //画展-画家补充信息
|
&model.ArtshowArtistSupplement{}, //画展-画家补充信息
|
||||||
&model.Contract{}, //合同
|
&model.Contract{}, //合同
|
||||||
|
&model.StatementBatch{}, //对账单批次
|
||||||
|
&model.StatementDetail{}, //对账单详情
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("register table fail")
|
fmt.Println("register table fail")
|
||||||
|
Loading…
Reference in New Issue
Block a user