feat(quality-owner): 增加优质号主、极品专区与无忧租号保险
- 支持保证金余额支付、在线支付开通及后台手动设置审计 - 新增极品专区发布权限、赔付方案与保险结算费率快照 - 优化首页、商品卡和个人中心的优质号主身份展示
This commit is contained in:
@@ -43,6 +43,9 @@ type RentalListing struct {
|
||||
ManagedAdminID *uint64 `gorm:"index" json:"managed_admin_id"`
|
||||
DistributionSiteID *uint64 `gorm:"column:distribution_site_id;index" json:"distribution_site_id,omitempty"`
|
||||
SourceChannel string `gorm:"size:64;not null;default:''" json:"-"`
|
||||
IsPremium bool `gorm:"not null;default:false" json:"is_premium"`
|
||||
CompensationPlan string `gorm:"size:16;not null;default:'normal'" json:"compensation_plan"`
|
||||
InsuranceFeeBps int `gorm:"not null;default:0" json:"insurance_fee_bps"`
|
||||
ReviewReason string `gorm:"size:255;not null;default:''" json:"review_reason"`
|
||||
PublishedAt *time.Time `json:"published_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
|
||||
@@ -53,6 +53,10 @@ type RentalOrder struct {
|
||||
DistributionSiteID *uint64 `gorm:"index" json:"distribution_site_id,omitempty"`
|
||||
DistributionMode string `gorm:"size:32;not null;default:'';index" json:"distribution_mode"`
|
||||
DistributionRuleVersionID *uint64 `gorm:"index" json:"distribution_rule_version_id,omitempty"`
|
||||
IsPremium bool `gorm:"not null;default:false" json:"is_premium"`
|
||||
CompensationPlan string `gorm:"size:16;not null;default:'normal'" json:"compensation_plan"`
|
||||
InsuranceFeeBps int `gorm:"not null;default:0" json:"insurance_fee_bps"`
|
||||
InsuranceFeeCent int64 `gorm:"not null;default:0" json:"insurance_fee_cent"`
|
||||
Status string `gorm:"size:32;not null;default:'pending_payment'" json:"status"`
|
||||
HandoffStatus string `gorm:"size:32;not null;default:'none'" json:"handoff_status"`
|
||||
HandoffMode string `gorm:"size:16;not null;default:'owner';index" json:"handoff_mode"`
|
||||
|
||||
@@ -17,6 +17,8 @@ type OrderCheckout struct {
|
||||
RentAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
OwnerRentAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
PlatformFeeCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
InsuranceFeeBps int `gorm:"not null;default:0" json:"-"`
|
||||
InsuranceFeeCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
DepositAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
PureCoinAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
PureCoinDiscountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
|
||||
@@ -11,6 +11,7 @@ type PaymentOrder struct {
|
||||
PaymentNo string `gorm:"size:64;not null;uniqueIndex" json:"payment_no"`
|
||||
OrderID uint64 `gorm:"not null;index" json:"order_id"`
|
||||
OrderNo string `gorm:"size:64;not null;index" json:"order_no"`
|
||||
BizID uint64 `gorm:"not null;default:0;index:idx_payment_orders_user_biz,priority:3" json:"biz_id"`
|
||||
UserID uint64 `gorm:"not null;index" json:"user_id"`
|
||||
PaymentConfigID uint64 `gorm:"not null;default:0;index" json:"payment_config_id"`
|
||||
Provider string `gorm:"size:32;not null" json:"provider"`
|
||||
|
||||
@@ -3,18 +3,22 @@ package model
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
Phone string `gorm:"size:32;not null;uniqueIndex" json:"phone"`
|
||||
PasswordHash string `gorm:"size:255;not null;default:''" json:"-"`
|
||||
Nickname string `gorm:"size:64;not null;default:''" json:"nickname"`
|
||||
AvatarURL string `gorm:"size:512;not null;default:''" json:"avatar_url"`
|
||||
RealnameStatus string `gorm:"size:32;not null;default:'unverified'" json:"realname_status"`
|
||||
RiskStatus string `gorm:"size:32;not null;default:'normal'" json:"risk_status"`
|
||||
CreditScore int `gorm:"not null;default:100" json:"credit_score"`
|
||||
DepositFreeQuotaCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
RenterGrowthPoints int64 `gorm:"not null;default:0;index:idx_users_renter_growth_level,priority:2" json:"renter_growth_points"`
|
||||
RenterGrowthLevel string `gorm:"size:32;not null;default:'normal';index:idx_users_renter_growth_level,priority:1" json:"renter_growth_level"`
|
||||
Status string `gorm:"size:32;not null;default:'active'" json:"status"`
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
Phone string `gorm:"size:32;not null;uniqueIndex" json:"phone"`
|
||||
PasswordHash string `gorm:"size:255;not null;default:''" json:"-"`
|
||||
Nickname string `gorm:"size:64;not null;default:''" json:"nickname"`
|
||||
AvatarURL string `gorm:"size:512;not null;default:''" json:"avatar_url"`
|
||||
RealnameStatus string `gorm:"size:32;not null;default:'unverified'" json:"realname_status"`
|
||||
RiskStatus string `gorm:"size:32;not null;default:'normal'" json:"risk_status"`
|
||||
CreditScore int `gorm:"not null;default:100" json:"credit_score"`
|
||||
DepositFreeQuotaCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
RenterGrowthPoints int64 `gorm:"not null;default:0;index:idx_users_renter_growth_level,priority:2" json:"renter_growth_points"`
|
||||
RenterGrowthLevel string `gorm:"size:32;not null;default:'normal';index:idx_users_renter_growth_level,priority:1" json:"renter_growth_level"`
|
||||
Status string `gorm:"size:32;not null;default:'active'" json:"status"`
|
||||
QualityOwnerStatus string `gorm:"size:16;not null;default:'none';index:idx_users_quality_owner_status" json:"quality_owner_status"`
|
||||
QualityOwnerDepositCent int64 `gorm:"not null;default:0" json:"quality_owner_deposit_cent"`
|
||||
QualityOwnerDepositSource string `gorm:"size:16;not null;default:''" json:"quality_owner_deposit_source"`
|
||||
QualityOwnerActivatedAt *time.Time `json:"quality_owner_activated_at"`
|
||||
// 会话版本:递增后该用户已签发的全部令牌立即失效。
|
||||
// 默认值对齐迁移 000052 的 users.token_version DEFAULT 0。
|
||||
TokenVersion int64 `gorm:"not null;default:0" json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user