package com.ruoyi.school.salary.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.utils.SecurityUtils;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@TableName("sc_commission_plans")
public class ScCommissionPlans {

    @TableId()
    private Long id;

    private String planName;

    private BigDecimal tier1Threshold;

    private BigDecimal tier1Rate;

    private BigDecimal tier2Threshold;

    private BigDecimal tier2Rate;

    private BigDecimal tier3Threshold;

    private BigDecimal tier3Rate;

    private BigDecimal tier4Rate;

    private BigDecimal renewalRate;

    private BigDecimal referralRate;

    private Byte isActive;


    private String tenantId;


    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date effectiveDate;

    private Date createdAt;

    public String getTenantId(){
        return SecurityUtils.getLoginUser().getNowTenantId();
    }

}
