package com.writeoff.module.meeting.model;

import io.swagger.v3.oas.annotations.media.Schema;

@Schema(description = "会议实体")
public class Meeting {
    @Schema(description = "会议ID")
    private Long id;
    @Schema(description = "项目ID")
    private Long projectId;
    @Schema(description = "项目名称（展示字段）")
    private String projectName;
    @Schema(description = "会议主题")
    private String topic;
    @Schema(description = "会议类别")
    private String meetingCategory;
    @Schema(description = "会议形式")
    private String meetingForm;
    @Schema(description = "会议地点")
    private String location;
    @Schema(description = "会议开始时间，格式：yyyy-MM-dd HH:mm:ss")
    private String startTime;
    @Schema(description = "会议结束时间，格式：yyyy-MM-dd HH:mm:ss")
    private String endTime;
    @Schema(description = "会议预算，单位：分")
    private long budgetCent;
    @Schema(description = "劳务费用占比，范围：[0,1]")
    private double laborRatio;
    @Schema(description = "餐费占比，范围：[0,1]")
    private double cateringRatio;
    @Schema(description = "会议状态")
    private MeetingStatus status;
    @Schema(description = "会议审核状态")
    private MeetingAuditStatus auditStatus;
    @Schema(description = "当前审核节点")
    private String currentAuditNode;
    @Schema(description = "最后提交时间，格式：yyyy-MM-ddTHH:mm:ss")
    private String lastSubmitAt;
    @Schema(description = "最后驳回原因摘要")
    private String lastRejectReason;
    @Schema(description = "逾期天数")
    private int overdueDays;
    @Schema(description = "风险标记JSON")
    private String riskFlagsJson;
    @Schema(description = "是否冻结")
    private boolean frozen;
    @Schema(description = "冻结原因")
    private String freezeReason;
    @Schema(description = "当前审核人用户ID")
    private Long currentAuditorUserId;
    @Schema(description = "当前节点SLA截止时间，格式：yyyy-MM-ddTHH:mm:ss")
    private String nodeDeadlineAt;
    @Schema(description = "累计驳回次数")
    private int rejectCount;
    @Schema(description = "最后一次流程动作时间，格式：yyyy-MM-ddTHH:mm:ss")
    private String lastActionAt;
    @Schema(description = "会议状态最近变更时间，格式：yyyy-MM-ddTHH:mm:ss")
    private String statusChangedAt;
    @Schema(description = "会议状态最近变更人用户ID")
    private Long statusChangedBy;
    @Schema(description = "取消原因")
    private String cancelReason;
    @Schema(description = "延期原因")
    private String postponeReason;
    @Schema(description = "撤回原因")
    private String withdrawReason;
    @Schema(description = "字段锁版本号（并发控制）")
    private int lockVersion;
    @Schema(description = "字段锁定时间，格式：yyyy-MM-ddTHH:mm:ss")
    private String lockAt;
    @Schema(description = "字段锁定操作人用户ID")
    private Long lockedBy;
    @Schema(description = "动态会议发票模块配置JSON")
    private String invoiceConfigJson;
    @Schema(description = "是否已软删除")
    private boolean deleted;

    public Meeting(Long id, Long projectId, String topic, long budgetCent, MeetingStatus status, MeetingAuditStatus auditStatus) {
        this(
                id, projectId, topic, null, null, null, null, null, budgetCent, 0d, 0d, status, auditStatus, null,
                null, null, 0, null, false, null, null, null, 0, null, null, null, null, null, null, 0, null, null, null
        );
    }

    public Meeting(Long id,
                   Long projectId,
                   String topic,
                   String meetingCategory,
                   String meetingForm,
                   String location,
                   String startTime,
                   String endTime,
                   long budgetCent,
                   double laborRatio,
                   double cateringRatio,
                   MeetingStatus status,
                   MeetingAuditStatus auditStatus,
                   String currentAuditNode,
                   String lastSubmitAt,
                   String lastRejectReason,
                   int overdueDays,
                   String riskFlagsJson,
                   boolean frozen,
                   String freezeReason,
                   Long currentAuditorUserId,
                   String nodeDeadlineAt,
                   int rejectCount,
                   String lastActionAt,
                   String statusChangedAt,
                   Long statusChangedBy,
                   String cancelReason,
                   String postponeReason,
                   String withdrawReason,
                   int lockVersion,
                   String lockAt,
                   Long lockedBy,
                   String invoiceConfigJson) {
        this(id, projectId, topic, meetingCategory, meetingForm, location, startTime, endTime, budgetCent, laborRatio, cateringRatio,
                status, auditStatus, currentAuditNode, lastSubmitAt, lastRejectReason, overdueDays, riskFlagsJson, frozen, freezeReason,
                currentAuditorUserId, nodeDeadlineAt, rejectCount, lastActionAt, statusChangedAt, statusChangedBy, cancelReason,
                postponeReason, withdrawReason, lockVersion, lockAt, lockedBy, invoiceConfigJson, false);
    }

    public Meeting(Long id,
                   Long projectId,
                   String topic,
                   String meetingCategory,
                   String meetingForm,
                   String location,
                   String startTime,
                   String endTime,
                   long budgetCent,
                   double laborRatio,
                   double cateringRatio,
                   MeetingStatus status,
                   MeetingAuditStatus auditStatus,
                   String currentAuditNode,
                   String lastSubmitAt,
                   String lastRejectReason,
                   int overdueDays,
                   String riskFlagsJson,
                   boolean frozen,
                   String freezeReason,
                   Long currentAuditorUserId,
                   String nodeDeadlineAt,
                   int rejectCount,
                   String lastActionAt,
                   String statusChangedAt,
                   Long statusChangedBy,
                   String cancelReason,
                   String postponeReason,
                   String withdrawReason,
                   int lockVersion,
                   String lockAt,
                   Long lockedBy,
                   String invoiceConfigJson,
                   boolean deleted) {
        this.id = id;
        this.projectId = projectId;
        this.topic = topic;
        this.meetingCategory = meetingCategory;
        this.meetingForm = meetingForm;
        this.location = location;
        this.startTime = startTime;
        this.endTime = endTime;
        this.budgetCent = budgetCent;
        this.laborRatio = laborRatio;
        this.cateringRatio = cateringRatio;
        this.status = status;
        this.auditStatus = auditStatus;
        this.currentAuditNode = currentAuditNode;
        this.lastSubmitAt = lastSubmitAt;
        this.lastRejectReason = lastRejectReason;
        this.overdueDays = overdueDays;
        this.riskFlagsJson = riskFlagsJson;
        this.frozen = frozen;
        this.freezeReason = freezeReason;
        this.currentAuditorUserId = currentAuditorUserId;
        this.nodeDeadlineAt = nodeDeadlineAt;
        this.rejectCount = rejectCount;
        this.lastActionAt = lastActionAt;
        this.statusChangedAt = statusChangedAt;
        this.statusChangedBy = statusChangedBy;
        this.cancelReason = cancelReason;
        this.postponeReason = postponeReason;
        this.withdrawReason = withdrawReason;
        this.lockVersion = lockVersion;
        this.lockAt = lockAt;
        this.lockedBy = lockedBy;
        this.invoiceConfigJson = invoiceConfigJson;
        this.deleted = deleted;
    }

    public Long getId() {
        return id;
    }

    public Long getProjectId() {
        return projectId;
    }

    public String getProjectName() {
        return projectName;
    }

    public String getTopic() {
        return topic;
    }

    public String getMeetingCategory() {
        return meetingCategory;
    }

    public String getMeetingForm() {
        return meetingForm;
    }

    public String getLocation() {
        return location;
    }

    public String getStartTime() {
        return startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public long getBudgetCent() {
        return budgetCent;
    }

    public double getLaborRatio() {
        return laborRatio;
    }

    public double getCateringRatio() {
        return cateringRatio;
    }

    public MeetingStatus getStatus() {
        return status;
    }

    public MeetingAuditStatus getAuditStatus() {
        return auditStatus;
    }

    public String getCurrentAuditNode() {
        return currentAuditNode;
    }

    public String getLastSubmitAt() {
        return lastSubmitAt;
    }

    public String getLastRejectReason() {
        return lastRejectReason;
    }

    public int getOverdueDays() {
        return overdueDays;
    }

    public String getRiskFlagsJson() {
        return riskFlagsJson;
    }

    public boolean isFrozen() {
        return frozen;
    }

    public String getFreezeReason() {
        return freezeReason;
    }

    public Long getCurrentAuditorUserId() {
        return currentAuditorUserId;
    }

    public String getNodeDeadlineAt() {
        return nodeDeadlineAt;
    }

    public int getRejectCount() {
        return rejectCount;
    }

    public String getLastActionAt() {
        return lastActionAt;
    }

    public String getStatusChangedAt() {
        return statusChangedAt;
    }

    public Long getStatusChangedBy() {
        return statusChangedBy;
    }

    public String getCancelReason() {
        return cancelReason;
    }

    public String getPostponeReason() {
        return postponeReason;
    }

    public String getWithdrawReason() {
        return withdrawReason;
    }

    public int getLockVersion() {
        return lockVersion;
    }

    public String getLockAt() {
        return lockAt;
    }

    public Long getLockedBy() {
        return lockedBy;
    }

    public void setStatus(MeetingStatus status) {
        this.status = status;
    }

    public void setAuditStatus(MeetingAuditStatus auditStatus) {
        this.auditStatus = auditStatus;
    }

    public void setCurrentAuditNode(String currentAuditNode) {
        this.currentAuditNode = currentAuditNode;
    }

    public void setLastSubmitAt(String lastSubmitAt) {
        this.lastSubmitAt = lastSubmitAt;
    }

    public void setLastRejectReason(String lastRejectReason) {
        this.lastRejectReason = lastRejectReason;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public void setCurrentAuditorUserId(Long currentAuditorUserId) {
        this.currentAuditorUserId = currentAuditorUserId;
    }

    public void setNodeDeadlineAt(String nodeDeadlineAt) {
        this.nodeDeadlineAt = nodeDeadlineAt;
    }

    public void setRejectCount(int rejectCount) {
        this.rejectCount = rejectCount;
    }

    public void setLastActionAt(String lastActionAt) {
        this.lastActionAt = lastActionAt;
    }

    public void setStatusChangedAt(String statusChangedAt) {
        this.statusChangedAt = statusChangedAt;
    }

    public void setStatusChangedBy(Long statusChangedBy) {
        this.statusChangedBy = statusChangedBy;
    }

    public void setCancelReason(String cancelReason) {
        this.cancelReason = cancelReason;
    }

    public void setPostponeReason(String postponeReason) {
        this.postponeReason = postponeReason;
    }

    public void setWithdrawReason(String withdrawReason) {
        this.withdrawReason = withdrawReason;
    }

    public void setLockVersion(int lockVersion) {
        this.lockVersion = lockVersion;
    }

    public void setLockAt(String lockAt) {
        this.lockAt = lockAt;
    }

    public void setLockedBy(Long lockedBy) {
        this.lockedBy = lockedBy;
    }

    public String getInvoiceConfigJson() {
        return invoiceConfigJson;
    }

    public void setInvoiceConfigJson(String invoiceConfigJson) {
        this.invoiceConfigJson = invoiceConfigJson;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }
}
