- 新建 admin_pickups 表独立于 rental_orders,不污染订单状态机与财务统计口径 - 提号中/已完成/已取消三态:创建锁定账号,完成时给卖家钱包加可用余额并下架 listing,取消解锁账号 - 完成时 listing 置 completed,复用现有 listingLockedForOwnerMutation 拦截再上架 - 管理端提号管理页(列表/创建/完成/取消/可提号账号搜索)+ 卖家端提号记录页 - 财务仪表盘新增线下提号独立统计块,与正常订单口径分离 - 钱包流水 label、状态标签、菜单入口同步补齐 - 优化卖家服务悬浮菜单为一行四个,尺寸与配色对齐买家服务
28 lines
1.3 KiB
Go
28 lines
1.3 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// AdminPickup 管理员线下提号记录。
|
|
// 独立于 rental_orders,不进入正常订单状态机与财务统计口径,
|
|
// 完成时通过 wallet.AppendEntries 给卖家增加可用余额。
|
|
type AdminPickup struct {
|
|
ID uint64 `gorm:"primaryKey" json:"id"`
|
|
PickupNo string `gorm:"size:64;not null;uniqueIndex" json:"pickup_no"`
|
|
ListingID uint64 `gorm:"not null;index" json:"listing_id"`
|
|
AccountID uint64 `gorm:"not null;index" json:"account_id"`
|
|
OwnerID uint64 `gorm:"not null;index" json:"owner_id"`
|
|
AdminID uint64 `gorm:"not null" json:"admin_id"`
|
|
Platform string `gorm:"size:32;not null;default:''" json:"platform"`
|
|
SettleAmountCent int64 `gorm:"not null;default:0" json:"settle_amount_cent"`
|
|
Status string `gorm:"size:20;not null;default:'picking_up';index" json:"status"`
|
|
Remark string `gorm:"size:255;not null;default:''" json:"remark"`
|
|
CompleteRemark string `gorm:"size:255;not null;default:''" json:"complete_remark"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
CompletedAt *time.Time `json:"completed_at,omitempty"`
|
|
CancelledAt *time.Time `json:"cancelled_at,omitempty"`
|
|
}
|
|
|
|
func (AdminPickup) TableName() string {
|
|
return "admin_pickups"
|
|
}
|