2026-07-28 10:42:26 +08:00
|
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"git.apinb.com/bsm-sdk/core/database"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// GasorderConfirm 对应 gasorder_confirm,保存用户签收确认。
|
|
|
|
|
|
type GasorderConfirm struct {
|
|
|
|
|
|
Entity // 公共实体字段
|
2026-07-30 21:47:41 +08:00
|
|
|
|
GasorderBasicID uint64 `gorm:"column:gasorder_basic_id;not null;uniqueIndex" json:"gasorder_basic_id"` // 订单自增主键
|
|
|
|
|
|
RequestNo string `gorm:"column:request_no;type:varchar(128);not null;default:'';uniqueIndex:,where:request_no <> ''" json:"request_no"` // 客户端提交幂等号
|
|
|
|
|
|
ConfirmType string `gorm:"column:confirm_type;type:varchar(32);not null" json:"confirm_type"` // 签收类型
|
|
|
|
|
|
RecipientName string `gorm:"column:recipient_name;type:varchar(64);not null" json:"recipient_name"` // 签收人姓名快照
|
|
|
|
|
|
RecipientPhone string `gorm:"column:recipient_phone;type:varchar(32);not null;default:''" json:"recipient_phone"` // 签收人手机号快照
|
|
|
|
|
|
ProofURI string `gorm:"column:proof_uri;type:varchar(512);not null;default:''" json:"proof_uri"` // 签名或凭证地址
|
|
|
|
|
|
ConfirmedAt time.Time `gorm:"column:confirmed_at;type:timestamptz;not null;index" json:"confirmed_at"` // 确认时间
|
|
|
|
|
|
Remark string `gorm:"column:remark;type:text;not null;default:''" json:"remark"` // 签收备注
|
2026-07-28 10:42:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() { database.AppendMigrate(&GasorderConfirm{}) }
|
|
|
|
|
|
func (table *GasorderConfirm) TableName() string { return "gasorder_confirm" }
|