package com.red.circle.other.infra.database.mongo.entity.bd;

import com.red.circle.other.infra.enums.BdPolicyType;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * BD 工资政策配置.
 *
 * @author AI Assistant
 * @since 2025-10-29
 */
@Data
@Accessors(chain = true)
@Document("bd_salary_policy")
public class BdSalaryPolicy implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID.
     */
    @Id
    private String id;

    /**
     * 政策类型：TEAM_SALARY | TEAM_RECHARGE.
     */
    private String policyType;

    /**
     * 等级.
     */
    private Integer level;

    /**
     * 所需 Agent 数量.
     */
    private Integer requiredAgencyNumber;

    /**
     * 团队金额要求（美元）.
     * - 当 policyType = TEAM_SALARY 时，表示团队工资总和要求
     * - 当 policyType = TEAM_RECHARGE 时，表示团队充值总和要求
     */
    private BigDecimal requiredTeamAmount;

    /**
     * 提成比例（百分比，如 3% 存储为 3.00）.
     */
    private BigDecimal commissionRate;

    /**
     * 是否启用.
     */
    private Boolean enabled;

    /**
     * 创建时间.
     */
    private Timestamp createTime;

    /**
     * 更新时间.
     */
    private Timestamp updateTime;
}
