package gorm_model

import (
	"time"
)

type YounggeeSupplierWithdraw struct {
	SupplierWithdrawId int        `gorm:"column:supplier_withdraw_id;primary_key"` // 提现流水ID
	SupplierId         int        `gorm:"column:supplier_id"`                      // 服务商ID
	WithdrawAmount     float64    `gorm:"column:withdraw_amount"`                  // 提现金额
	AmountPayable      float64    `gorm:"column:amount_payable"`                   // 实际提现金额（扣税后）
	InvoiceIds         string     `gorm:"column:invoice_ids"`                      // 发票ID列表（根据发票ID去查对应的income)
	IncomeIds          string     `gorm:"column:income_ids"`                       // 收入列表（个人服务商不需要回票所以看这个）
	Company            string     `gorm:"column:company"`                          // 机构名称
	SupplierType       int        `gorm:"column:supplier_type"`                    // 服务商用户类型，1为个人PR，2为机构
	Name               string     `gorm:"column:name"`                             // 姓名
	IDNumber           string     `gorm:"column:id_number"`                        // 身份证号码
	BankName           string     `gorm:"column:bank_name"`                        // 提现银行
	BankNumber         string     `gorm:"column:bank_number"`                      // 提现银行卡号
	Phone              string     `gorm:"column:phone"`                            // 手机号码
	WithdrawStatus     int        `gorm:"column:withdraw_status"`                  // 提现状态：1待提现，2提现中，3已提现，4已驳回
	SupplyTime         *time.Time `gorm:"column:supply_time"`
	AgreeTime          *time.Time `gorm:"column:agree_time"`
	RejectTime         *time.Time `gorm:"column:reject_time"`
	FailReson          string     `gorm:"column:fail_reson"`
}

func (m *YounggeeSupplierWithdraw) TableName() string {
	return "younggee_supplier_withdraw"
}
