package com.ruoyi.credit.domain;

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

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.credit.annotation.EncryptedField;

/**
 * 服务周期对象 dc_service_period
 * 
 * @author ruoyi
 * @date 2025-12-23
 */
public class ServicePeriod extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 服务周期ID */
    private Long servicePeriodId;

    /** 周期编号 */
    @Excel(name = "周期编号")
    private String periodNumber;

    /** 关联合同ID */
    @Excel(name = "关联合同ID")
    private Long contractId;

    /** 服务开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "服务开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date serviceStartDate;

    /** 服务结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "服务结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date serviceEndDate;

    /** 服务天数 */
    @Excel(name = "服务天数")
    private Integer serviceDays;

    /** 服务内容描述 */
    @Excel(name = "服务内容描述")
    private String serviceContent;

    /** 总人工成本(加密) */
    @Excel(name = "总人工成本")
    @EncryptedField(algorithm = "AES-256-GCM")
    private BigDecimal totalLaborCost;

    /** 关联贷款总额(加密) */
    @Excel(name = "关联贷款总额")
    @EncryptedField(algorithm = "AES-256-GCM")
    private BigDecimal totalLoanAmount;

    /** 贷款倍数 */
    @Excel(name = "贷款倍数")
    private BigDecimal loanMultiplier;

    /** 周期状态 */
    @Excel(name = "周期状态")
    private String periodStatus;

    /** 员工数量 */
    @Excel(name = "员工数量")
    private Integer employeeCount;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;

    /** 更新人 */
    @Excel(name = "更新人")
    private String updatedBy;

    /** 部门ID */
    @Excel(name = "部门ID")
    private Long deptId;

    // 周期状态常量
    public static final String STATUS_CREATED = "CREATED";
    public static final String STATUS_COMPLETED = "COMPLETED";
    public static final String STATUS_CANCELLED = "CANCELLED";

    public void setServicePeriodId(Long servicePeriodId) 
    {
        this.servicePeriodId = servicePeriodId;
    }

    public Long getServicePeriodId() 
    {
        return servicePeriodId;
    }

    public void setPeriodNumber(String periodNumber) 
    {
        this.periodNumber = periodNumber;
    }

    public String getPeriodNumber() 
    {
        return periodNumber;
    }

    public void setContractId(Long contractId) 
    {
        this.contractId = contractId;
    }

    public Long getContractId() 
    {
        return contractId;
    }

    public void setServiceStartDate(Date serviceStartDate) 
    {
        this.serviceStartDate = serviceStartDate;
    }

    public Date getServiceStartDate() 
    {
        return serviceStartDate;
    }

    public void setServiceEndDate(Date serviceEndDate) 
    {
        this.serviceEndDate = serviceEndDate;
    }

    public Date getServiceEndDate() 
    {
        return serviceEndDate;
    }

    public void setServiceDays(Integer serviceDays) 
    {
        this.serviceDays = serviceDays;
    }

    public Integer getServiceDays() 
    {
        return serviceDays;
    }

    public void setServiceContent(String serviceContent) 
    {
        this.serviceContent = serviceContent;
    }

    public String getServiceContent() 
    {
        return serviceContent;
    }

    public void setTotalLaborCost(BigDecimal totalLaborCost) 
    {
        this.totalLaborCost = totalLaborCost;
    }

    public BigDecimal getTotalLaborCost() 
    {
        return totalLaborCost;
    }

    public void setTotalLoanAmount(BigDecimal totalLoanAmount) 
    {
        this.totalLoanAmount = totalLoanAmount;
    }

    public BigDecimal getTotalLoanAmount() 
    {
        return totalLoanAmount;
    }

    public void setLoanMultiplier(BigDecimal loanMultiplier) 
    {
        this.loanMultiplier = loanMultiplier;
    }

    public BigDecimal getLoanMultiplier() 
    {
        return loanMultiplier;
    }

    public void setPeriodStatus(String periodStatus) 
    {
        this.periodStatus = periodStatus;
    }

    public String getPeriodStatus() 
    {
        return periodStatus;
    }

    public void setEmployeeCount(Integer employeeCount) 
    {
        this.employeeCount = employeeCount;
    }

    public Integer getEmployeeCount() 
    {
        return employeeCount;
    }

    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }

    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }

    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("servicePeriodId", getServicePeriodId())
            .append("periodNumber", getPeriodNumber())
            .append("contractId", getContractId())
            .append("serviceStartDate", getServiceStartDate())
            .append("serviceEndDate", getServiceEndDate())
            .append("serviceDays", getServiceDays())
            .append("serviceContent", getServiceContent())
            .append("totalLaborCost", getTotalLaborCost())
            .append("totalLoanAmount", getTotalLoanAmount())
            .append("loanMultiplier", getLoanMultiplier())
            .append("periodStatus", getPeriodStatus())
            .append("employeeCount", getEmployeeCount())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createdBy", getCreatedBy())
            .append("updatedBy", getUpdatedBy())
            .append("deptId", getDeptId())
            .toString();
    }
}