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

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

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Schema(description = "结算单摘要（发起结算响应）")
public class SettlementSummaryResponse {

    @JsonProperty("settlement_id")
    private Long settlementId;

    @JsonProperty("settlement_no")
    private String settlementNo;

    @JsonProperty("order_id")
    private Long orderId;

    @JsonProperty("order_no")
    private String orderNo;

    @JsonProperty("current_step_code")
    private String currentStepCode;

    @JsonProperty("settlement_status")
    private String settlementStatus;

    @JsonProperty("worker_count")
    private Integer workerCount;

    @JsonProperty("planned_count")
    private Integer plannedCount;

    @JsonProperty("work_end_date")
    private LocalDate workEndDate;

    @JsonProperty("gross_amount")
    private BigDecimal grossAmount;

    @JsonProperty("deduction_amount")
    private BigDecimal deductionAmount;

    @JsonProperty("net_amount")
    private BigDecimal netAmount;

    @JsonProperty("service_fee_amount")
    private BigDecimal serviceFeeAmount;

    @JsonProperty("invoice_amount")
    private BigDecimal invoiceAmount;

    @JsonProperty("total_outflow")
    private BigDecimal totalOutflow;

    @JsonProperty("before_end_date")
    private Boolean beforeEndDate;

    @Schema(description = "是否本次新创建")
    private Boolean created;

    private String message;

    @JsonProperty("create_time")
    private LocalDateTime createTime;

    @JsonProperty("confirmed_at")
    private LocalDateTime confirmedAt;

    @JsonProperty("paid_at")
    private LocalDateTime paidAt;

    @JsonProperty("payment_id")
    private Long paymentId;

    @JsonProperty("payment_no")
    private String paymentNo;

    @JsonProperty("payment_channel")
    private String paymentChannel;

    @JsonProperty("payment_status")
    private String paymentStatus;

    @JsonProperty("payment_amount")
    private BigDecimal paymentAmount;

    @JsonProperty("external_trade_no")
    private String externalTradeNo;

    private List<SettlementItemResponse> items = new ArrayList<>();

    private List<SettlementFeeResponse> fees = new ArrayList<>();

    public Long getSettlementId() {
        return settlementId;
    }

    public void setSettlementId(Long settlementId) {
        this.settlementId = settlementId;
    }

    public String getSettlementNo() {
        return settlementNo;
    }

    public void setSettlementNo(String settlementNo) {
        this.settlementNo = settlementNo;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getCurrentStepCode() {
        return currentStepCode;
    }

    public void setCurrentStepCode(String currentStepCode) {
        this.currentStepCode = currentStepCode;
    }

    public String getSettlementStatus() {
        return settlementStatus;
    }

    public void setSettlementStatus(String settlementStatus) {
        this.settlementStatus = settlementStatus;
    }

    public Integer getWorkerCount() {
        return workerCount;
    }

    public void setWorkerCount(Integer workerCount) {
        this.workerCount = workerCount;
    }

    public Integer getPlannedCount() {
        return plannedCount;
    }

    public void setPlannedCount(Integer plannedCount) {
        this.plannedCount = plannedCount;
    }

    public LocalDate getWorkEndDate() {
        return workEndDate;
    }

    public void setWorkEndDate(LocalDate workEndDate) {
        this.workEndDate = workEndDate;
    }

    public BigDecimal getGrossAmount() {
        return grossAmount;
    }

    public void setGrossAmount(BigDecimal grossAmount) {
        this.grossAmount = grossAmount;
    }

    public BigDecimal getDeductionAmount() {
        return deductionAmount;
    }

    public void setDeductionAmount(BigDecimal deductionAmount) {
        this.deductionAmount = deductionAmount;
    }

    public BigDecimal getNetAmount() {
        return netAmount;
    }

    public void setNetAmount(BigDecimal netAmount) {
        this.netAmount = netAmount;
    }

    public BigDecimal getServiceFeeAmount() {
        return serviceFeeAmount;
    }

    public void setServiceFeeAmount(BigDecimal serviceFeeAmount) {
        this.serviceFeeAmount = serviceFeeAmount;
    }

    public BigDecimal getInvoiceAmount() {
        return invoiceAmount;
    }

    public void setInvoiceAmount(BigDecimal invoiceAmount) {
        this.invoiceAmount = invoiceAmount;
    }

    public BigDecimal getTotalOutflow() {
        return totalOutflow;
    }

    public void setTotalOutflow(BigDecimal totalOutflow) {
        this.totalOutflow = totalOutflow;
    }

    public Boolean getBeforeEndDate() {
        return beforeEndDate;
    }

    public void setBeforeEndDate(Boolean beforeEndDate) {
        this.beforeEndDate = beforeEndDate;
    }

    public Boolean getCreated() {
        return created;
    }

    public void setCreated(Boolean created) {
        this.created = created;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getConfirmedAt() {
        return confirmedAt;
    }

    public void setConfirmedAt(LocalDateTime confirmedAt) {
        this.confirmedAt = confirmedAt;
    }

    public LocalDateTime getPaidAt() {
        return paidAt;
    }

    public void setPaidAt(LocalDateTime paidAt) {
        this.paidAt = paidAt;
    }

    public Long getPaymentId() {
        return paymentId;
    }

    public void setPaymentId(Long paymentId) {
        this.paymentId = paymentId;
    }

    public String getPaymentNo() {
        return paymentNo;
    }

    public void setPaymentNo(String paymentNo) {
        this.paymentNo = paymentNo;
    }

    public String getPaymentChannel() {
        return paymentChannel;
    }

    public void setPaymentChannel(String paymentChannel) {
        this.paymentChannel = paymentChannel;
    }

    public String getPaymentStatus() {
        return paymentStatus;
    }

    public void setPaymentStatus(String paymentStatus) {
        this.paymentStatus = paymentStatus;
    }

    public BigDecimal getPaymentAmount() {
        return paymentAmount;
    }

    public void setPaymentAmount(BigDecimal paymentAmount) {
        this.paymentAmount = paymentAmount;
    }

    public String getExternalTradeNo() {
        return externalTradeNo;
    }

    public void setExternalTradeNo(String externalTradeNo) {
        this.externalTradeNo = externalTradeNo;
    }

    public List<SettlementItemResponse> getItems() {
        return items;
    }

    public void setItems(List<SettlementItemResponse> items) {
        this.items = items != null ? items : new ArrayList<>();
    }

    public List<SettlementFeeResponse> getFees() {
        return fees;
    }

    public void setFees(List<SettlementFeeResponse> fees) {
        this.fees = fees != null ? fees : new ArrayList<>();
    }
}
