package teamsalarysettlement

type userDTO struct {
	UserID        string `json:"user_id"`
	DisplayUserID string `json:"display_user_id"`
	Username      string `json:"username"`
	Avatar        string `json:"avatar"`
}

type pendingDTO struct {
	PolicyType                string  `json:"policy_type"`
	UserID                    string  `json:"user_id"`
	User                      userDTO `json:"user"`
	CycleKey                  string  `json:"cycle_key"`
	RegionID                  int64   `json:"region_id"`
	RegionName                string  `json:"region_name"`
	PolicyID                  uint64  `json:"policy_id"`
	PolicyName                string  `json:"policy_name"`
	LevelNo                   int32   `json:"level_no"`
	IncomeUSDMinor            int64   `json:"income_usd_minor"`
	IncomeUSD                 string  `json:"income_usd"`
	SalaryUSDMinorTarget      int64   `json:"salary_usd_minor_target"`
	SalaryUSDTarget           string  `json:"salary_usd_target"`
	SalaryUSDMinorDelta       int64   `json:"salary_usd_minor_delta"`
	SalaryUSDDelta            string  `json:"salary_usd_delta"`
	SettledLevelNo            int32   `json:"settled_level_no"`
	SettledSalaryUSDMinor     int64   `json:"settled_salary_usd_minor"`
	SettledSalaryUSD          string  `json:"settled_salary_usd"`
	LastSettledIncomeUSDMinor int64   `json:"last_settled_income_usd_minor"`
	LastSettledIncomeUSD      string  `json:"last_settled_income_usd"`
	MonthClosedAtMS           int64   `json:"month_closed_at_ms"`
}

type recordDTO struct {
	SettlementID        string  `json:"settlement_id"`
	CommandID           string  `json:"command_id"`
	TransactionID       string  `json:"transaction_id"`
	PolicyType          string  `json:"policy_type"`
	TriggerMode         string  `json:"trigger_mode"`
	UserID              string  `json:"user_id"`
	User                userDTO `json:"user"`
	CycleKey            string  `json:"cycle_key"`
	RegionID            int64   `json:"region_id"`
	PolicyID            uint64  `json:"policy_id"`
	LevelNo             int32   `json:"level_no"`
	IncomeUSDMinor      int64   `json:"income_usd_minor"`
	IncomeUSD           string  `json:"income_usd"`
	SalaryUSDMinorDelta int64   `json:"salary_usd_minor_delta"`
	SalaryUSDDelta      string  `json:"salary_usd_delta"`
	Status              string  `json:"status"`
	Reason              string  `json:"reason"`
	CreatedAtMS         int64   `json:"created_at_ms"`
}

type pendingQuery struct {
	Page        int
	PageSize    int
	PolicyType  string
	TriggerMode string
	CycleKey    string
	RegionID    int64
	CountryID   int64
	CountryCode string
	UserID      int64
}

type recordQuery struct {
	Page        int
	PageSize    int
	PolicyType  string
	TriggerMode string
	CycleKey    string
	Status      string
	RegionID    int64
	CountryID   int64
	CountryCode string
	UserID      int64
	PolicyID    uint64
	StartAtMS   int64
	EndAtMS     int64
}

type settleRequest struct {
	PolicyType  string  `json:"policy_type"`
	TriggerMode string  `json:"trigger_mode"`
	CycleKey    string  `json:"cycle_key"`
	RegionID    int64   `json:"region_id"`
	CountryID   int64   `json:"country_id"`
	CountryCode string  `json:"country_code"`
	UserIDs     []int64 `json:"user_ids"`
}

type settleResultDTO struct {
	PolicyType     string      `json:"policy_type"`
	CycleKey       string      `json:"cycle_key"`
	RequestedCount int         `json:"requested_count"`
	ProcessedCount int         `json:"processed_count"`
	SuccessCount   int         `json:"success_count"`
	SkippedCount   int         `json:"skipped_count"`
	FailureCount   int         `json:"failure_count"`
	Records        []recordDTO `json:"records"`
}
