97 lines
6.7 KiB
Go
97 lines
6.7 KiB
Go
package model
|
|
|
|
import "gorm.io/plugin/soft_delete"
|
|
|
|
const (
|
|
InitPage = 1
|
|
PageSize = 15
|
|
)
|
|
|
|
//对账单画作物权
|
|
type ArtworkTx struct {
|
|
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作物权表的唯一表示,即批次Uid;NOT NULL" json:"uid"`
|
|
ArtistUid string `gorm:"column:artist_uid;type:varchar(100);comment:画家Uid;NOT NULL" json:"artist_uid"`
|
|
ArtistName string `gorm:"column:artist_name;type:varchar(100);comment:画家名;NOT NULL" json:"artist_name"`
|
|
BatchTime string `gorm:"column:batch_time;comment:批次时间" json:"batch_time"`
|
|
State int32 `gorm:"column:state;default:1;type:int(1);comment:对账单状态,1:未生成合同 2:已生成数据库一条合同数据(不管画家有没有点击过都是已生成未签署) 3:已签署(画家在画家宝那边签署了合同);NOT NULL" json:"state"`
|
|
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
|
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
|
DeletedAt soft_delete.DeletedAt
|
|
}
|
|
|
|
// 对账单画作物权委托详情(该画家一个批次的全部画作)
|
|
type ArtworkTxDetail struct {
|
|
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作物权详情表的唯一表示;NOT NULL" json:"uid"`
|
|
BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作物权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"`
|
|
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号" json:"tf_num"`
|
|
ArtworkName string `gorm:"column:artwork_name;comment:画作名称" json:"artwork_name"`
|
|
Ruler float32 `gorm:"column:ruler;comment:平尺" json:"ruler"`
|
|
MinPrice float32 `gorm:"column:min_price;comment:委托销售底价" json:"min_price"`
|
|
GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;" json:"guarantee_price"`
|
|
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
|
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
|
DeletedAt soft_delete.DeletedAt
|
|
}
|
|
|
|
// 对账单画作物权销售委托详情(该画家一个批次的全部已被售卖了的画作)
|
|
type ArtworkSoldTxDetail struct {
|
|
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作物权委托详情表的唯一表示;NOT NULL" json:"uid"`
|
|
BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作物权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"`
|
|
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号" json:"tf_num"`
|
|
ArtworkName string `gorm:"column:artwork_name;comment:画作名称" json:"artwork_name"`
|
|
Ruler float32 `gorm:"column:ruler;comment:平尺" json:"ruler"`
|
|
SaleNo string `gorm:"column:sale_no;comment:销售单号" json:"sale_no"`
|
|
CompleteDate string `gorm:"column:complete_date;comment:成交日期" json:"complete_date"`
|
|
SalePrice float32 `gorm:"column:sale_price;comment:画作售价" json:"sale_price"`
|
|
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
|
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
|
DeletedAt soft_delete.DeletedAt
|
|
}
|
|
|
|
//对账单画作版权
|
|
type ArtworkCopy struct {
|
|
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"uid"`
|
|
ArtistUid string `gorm:"column:artist_uid;type:varchar(100);comment:画家Uid;NOT NULL" json:"artist_uid"`
|
|
ArtistName string `gorm:"column:artist_name;type:varchar(100);comment:画家名;NOT NULL" json:"artist_name"`
|
|
BatchTime string `gorm:"column:batch_time;comment:批次时间" json:"batch_time"`
|
|
State int32 `gorm:"column:state;default:1;type:int(1);comment:对账单状态,1:未生成合同 2:已生成数据库一条合同数据(不管画家有没有点击过都是已生成未签署) 3:已签署(画家在画家宝那边签署了合同);NOT NULL" json:"state"`
|
|
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
|
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
|
DeletedAt soft_delete.DeletedAt
|
|
}
|
|
|
|
// 对账单画作版权委托详情(该画家一个批次的全部画作)
|
|
type ArtworkCopyDetail struct {
|
|
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权详情表的唯一表示;NOT NULL" json:"uid"`
|
|
BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"`
|
|
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号" json:"tf_num"`
|
|
ArtworkName string `gorm:"column:artwork_name;comment:画作名称" json:"tf_num"`
|
|
Ruler float32 `gorm:"column:ruler;comment:平尺" json:"ruler"`
|
|
MinPrice float32 `gorm:"column:min_price;comment:委托销售底价" json:"min_price"`
|
|
GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;" json:"guarantee_price"`
|
|
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
|
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
|
DeletedAt soft_delete.DeletedAt
|
|
}
|
|
|
|
// 对账单画作版权委托售卖详情(该画家一个批次的全部已被售卖了的画作)
|
|
type ArtworkSoldCopyDetail struct {
|
|
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权详情表的唯一表示;NOT NULL" json:"uid"`
|
|
BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"`
|
|
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号" json:"tf_num"`
|
|
ArtworkName string `gorm:"column:artwork_name;comment:画作名称" json:"tf_num"`
|
|
Ruler float32 `gorm:"column:ruler;comment:平尺" json:"ruler"`
|
|
SaleNo string `gorm:"column:sale_no;comment:销售单号" json:"sale_no"`
|
|
CompleteDate string `gorm:"column:complete_date;comment:成交日期" json:"complete_date"`
|
|
SalePrice float32 `gorm:"column:sale_price;comment:画作售价" json:"sale_price"`
|
|
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
|
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
|
DeletedAt soft_delete.DeletedAt
|
|
}
|