package com.huimv.employment.service.settlement.dto;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 企业发起结算请求体。
 * <p>默认要求已到 {@code work_end_date}；提前结算须将 {@link #allowBeforeEndDate} 置为 true。</p>
 */
@Schema(description = "企业发起结算请求")
public class OrderStartSettlementRequest {

    /** true=允许在计划结束日之前提前发起结算 */
    @JsonProperty("allow_before_end_date")
    @JsonAlias({"allowBeforeEndDate"})
    @Schema(description = "计划结束日未到时是否仍允许发起结算；默认 false")
    private Boolean allowBeforeEndDate;

    public Boolean getAllowBeforeEndDate() {
        return allowBeforeEndDate;
    }

    public void setAllowBeforeEndDate(Boolean allowBeforeEndDate) {
        this.allowBeforeEndDate = allowBeforeEndDate;
    }

    public boolean isAllowBeforeEndDate() {
        return Boolean.TRUE.equals(allowBeforeEndDate);
    }
}
