package com.engine.salary.entity.salarysob.dto;

import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.salary.common.LocalDateRange;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.YearMonth;
import java.util.Date;

/**
 * 薪资账套的周期
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalarySobCycleDTO {

    //薪资账套id
    private Long salarySobId;

    //薪资所属月
    @JsonSerialize(using = ToStringSerializer.class)
    private YearMonth salaryMonth;

    //税款所属期
    @JsonSerialize(using = ToStringSerializer.class)
    private YearMonth taxCycle;

    //社保福利所属期
    @JsonSerialize(using = ToStringSerializer.class)
    private YearMonth socialSecurityCycle;

    //薪资周期")
    private LocalDateRange salaryCycle;

    //考勤周期")
    private LocalDateRange attendCycle;


    /**
     * 公式变量
     */
    @SalaryFormulaVar(defaultLabel = "薪资所属月", labelId = 86321, dataType = "string")
    private Date salaryDate;
    @SalaryFormulaVar(defaultLabel = "税款所属期", labelId = 86321, dataType = "string")
    private Date taxDate;
    @SalaryFormulaVar(defaultLabel = "社保福利所属期", labelId = 86321, dataType = "string")
    private Date socialSecurityDate;
    @SalaryFormulaVar(defaultLabel = "薪资周期起始日期", labelId = 86321, dataType = "string")
    private Date salaryCycleFromDate;
    @SalaryFormulaVar(defaultLabel = "薪资周期结束日期", labelId = 86321, dataType = "string")
    private Date salaryCycleEndDate;
    @SalaryFormulaVar(defaultLabel = "考勤周期起始日期", labelId = 86321, dataType = "string")
    private Date attendCycleFromDate;
    @SalaryFormulaVar(defaultLabel = "考勤周期结束日期", labelId = 86321, dataType = "string")
    private Date attendCycleEndDate;
}
