fonchain-artistinfo/cmd/model/contract.go

26 lines
1.8 KiB
Go
Raw Normal View History

2023-03-10 09:58:13 +00:00
package model
import "gorm.io/plugin/soft_delete"
// Contract 用户模型
type Contract 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"`
ArtistUid string `gorm:"column:artist_uid;type:varchar(100);comment:画家uid;NOT NULL" json:"artist_uid"`
ArtworkUid string `gorm:"column:artwork_uid;type:varchar(1000);comment:画作uid" json:"artwork_uid"`
2023-03-17 13:17:15 +00:00
ContractId string `gorm:"column:contract_id;type:varchar(300);comment:合同id" json:"contract_id"`
TransactionId string `gorm:"column:transaction_id;type:varchar(300);comment:交易id" json:"transaction_id"`
2023-03-10 09:58:13 +00:00
Type int32 `gorm:"column:type;type:int(1);comment:合同类型;NOT NULL" json:"type"`
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"`
2023-03-17 02:46:56 +00:00
State int32 `gorm:"column:state;type:int(1);comment:合同状态;NOT NULL" json:"state"` //1 未签署
Status int32 `gorm:"column:status;default:2;comment:2=锁定 3=解锁" json:"status" ` //跟随用户的锁定和解锁状态,用于控制数据的展示
2023-03-10 09:58:13 +00:00
LockTime string `gorm:"column:lock_time;comment:锁定时间" json:"lockTime"`
SignTime string `gorm:"column:sign_time;comment:签署时间" json:"sign_time"`
2023-03-14 05:19:20 +00:00
BatchId int32 `gorm:"column:batch_id;comment:批次ID" json:"batch_id"`
BatchName string `gorm:"column:batch_name;comment:批次名" json:"batch_name"`
2023-03-10 09:58:13 +00:00
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
DeletedAt soft_delete.DeletedAt
}