diff --git a/cmd/model/contract.go b/cmd/model/contract.go index d46c4db..a62d5ba 100644 --- a/cmd/model/contract.go +++ b/cmd/model/contract.go @@ -18,8 +18,9 @@ type Contract struct { LockTime string `gorm:"column:lock_time;comment:锁定时间" json:"lockTime"` SignTime string `gorm:"column:sign_time;comment:签署时间" json:"sign_time"` BatchName string `gorm:"column:batch_name;comment:批次名" json:"batch_name"` + BatchID string `gorm:"column:batch_id;comment:批次ID" json:"batch_id"` StType int32 `gorm:"column:st_type;unqiueIndex:sttype_uid_batchtime_idx;comment:对账单类型 1=版权 2=物权;"` - ArtworkInfo []ArtworkTxDetail `gorm:"foreignKey:Uid;references:BatchUid"` //当前批次的物权委托单详情 + ArtworkInfo []ArtworkTxDetail `gorm:"foreignKey:BatchID;references:Uid"` //当前批次的物权委托单详情 CreatedAt int32 `gorm:"column:created_at;autoCreateTime"` UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"` DeletedAt soft_delete.DeletedAt