package ledger

// SalaryWithdrawalCommand 是用户提现审核链路上的工资冻结/扣冻/解冻账务命令。
//
// SalaryUSDMinor 使用美元分，保证 H5 表单、后台审核和 wallet-service 之间不经过浮点换算。
type SalaryWithdrawalCommand struct {
	AppCode         string
	CommandID       string
	UserID          int64
	SalaryAssetType string
	SalaryUSDMinor  int64
	// GrossUSDMinor 只在 POINT_DIAMOND 首次冻结时使用，wallet 按 Host 政策换算实际冻结积分。
	GrossUSDMinor           int64
	PointFeeAmount          int64
	PointNetAmount          int64
	PointsPerUSD            int64
	PointWithdrawFeeBPS     int64
	OperatorUserID          int64
	Reason                  string
	WithdrawalRef           string
	WithdrawalApplicationID string
	// FreezeTransactionID 让 POINT_DIAMOND 审核/回滚从首次冻结交易复制政策和美元快照，
	// 不能根据审核时当前政策反推历史金额。
	FreezeTransactionID string
	// RegionID 在首次冻结时由 gateway 从已校验的业务身份注入，用于绑定当前 UTC 月 Host 政策。
	RegionID int64
}

// SalaryWithdrawalReceipt 返回单边工资钱包变更后的余额，供 gateway/admin 回写申请单和前端展示。
type SalaryWithdrawalReceipt struct {
	TransactionID           string
	UserID                  int64
	SalaryAssetType         string
	SalaryUSDMinor          int64
	PointFeeAmount          int64
	PointNetAmount          int64
	PointsPerUSD            int64
	PointWithdrawFeeBPS     int64
	PointPolicyInstanceCode string
	GrossUSDMinor           int64
	FeeUSDMinor             int64
	NetUSDMinor             int64
	PointPolicyID           uint64
	PointPolicyVersion      uint64
	CoinsPerUSD             int64
	AvailableAfter          int64
	FrozenAfter             int64
	Version                 int64
	CreatedAtMS             int64
}

// PointWithdrawalCommand 是 POINT 提现的冻结/扣冻/解冻命令。
// GrossPointAmount 是实际冻结和扣减的积分总额；Fee/Net/PointsPerUSD 只做提现展示和审核快照。
type PointWithdrawalCommand struct {
	AppCode                 string
	CommandID               string
	UserID                  int64
	AssetType               string
	GrossPointAmount        int64
	GrossUSDMinor           int64
	FeePointAmount          int64
	NetPointAmount          int64
	PointsPerUSD            int64
	FeeBPS                  int64
	OperatorUserID          int64
	Reason                  string
	WithdrawalRef           string
	WithdrawalApplicationID string
	FreezeTransactionID     string
	RegionID                int64
}

// PointWithdrawalReceipt 返回 POINT 钱包冻结/扣冻/释放后的余额和费用快照。
type PointWithdrawalReceipt struct {
	TransactionID           string
	UserID                  int64
	AssetType               string
	GrossPointAmount        int64
	FeePointAmount          int64
	NetPointAmount          int64
	PointsPerUSD            int64
	FeeBPS                  int64
	PointPolicyInstanceCode string
	GrossUSDMinor           int64
	FeeUSDMinor             int64
	NetUSDMinor             int64
	PointPolicyID           uint64
	PointPolicyVersion      uint64
	CoinsPerUSD             int64
	AvailableAfter          int64
	FrozenAfter             int64
	Version                 int64
	CreatedAtMS             int64
}
