/**
 * BladeX Commercial License Agreement
 * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
 * <p>
 * Use of this software is governed by the Commercial License Agreement
 * obtained after purchasing a license from BladeX.
 * <p>
 * 1. This software is for development use only under a valid license
 * from BladeX.
 * <p>
 * 2. Redistribution of this software's source code to any third party
 * without a commercial license is strictly prohibited.
 * <p>
 * 3. Licensees may copyright their own code but cannot use segments
 * from this software for such purposes. Copyright of this software
 * remains with BladeX.
 * <p>
 * Using this software signifies agreement to this License, and the software
 * must not be used for illegal purposes.
 * <p>
 * Author: Chill Zhuang (bladejava@qq.com)
 */
package org.springblade.transport.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;

import java.io.Serial;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 合同管理实体类
 *
 * @author Chill
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_contract_manage")
@Schema(description = "合同管理")
public class ContractManage extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "合同编号")
	private String contractNo;

	@Schema(description = "合同名称")
	private String contractName;

	@Schema(description = "所属项目ID")
	private Long projectId;

	@Schema(description = "所属项目")
	private String projectName;

	@Schema(description = "所属组织ID")
	private Long organizationId;

	@Schema(description = "所属组织")
	private String organizationName;

	@Schema(description = "合同类别")
	private String contractCategory;

	@Schema(description = "签约类型")
	private String signType;

	@Schema(description = "甲方")
	private String partyA;

	@Schema(description = "乙方")
	private String partyB;

	@Schema(description = "开始日期")
	private LocalDate startDate;

	@Schema(description = "结束日期")
	private LocalDate endDate;

	@Schema(description = "临时效力起")
	private LocalDate temporaryStartDate;

	@Schema(description = "临时效力止")
	private LocalDate temporaryEndDate;

	@Schema(description = "经办人ID")
	private Long handlerUserId;

	@Schema(description = "经办人")
	private String handlerUserName;

	@Schema(description = "签订日期")
	private LocalDate signDate;

	@Schema(description = "结算方式")
	private String settlementMode;

	@Schema(description = "合同格式")
	private String contractFormat;

	@Schema(description = "是否需要加盖法人章")
	private Integer legalSealFlag;

	@Schema(description = "一式份数")
	@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
	private Integer copyCount;

	@Schema(description = "回款账期(天)")
	@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
	private Integer paymentDays;

	@Schema(description = "合同阶段")
	private String contractStage;

	@Schema(description = "审核状态")
	private String approvalStatus;

	@Schema(description = "当前节点")
	private String currentNode;

	@Schema(description = "当前处理人")
	private String currentProcessor;

	@Schema(description = "审核通过时间")
	private LocalDateTime approvedTime;

	@Schema(description = "计费信息开关")
	private Integer billingEnabled;

	@Schema(description = "合同主文件JSON")
	private String contractFileJson;

	@Schema(description = "其它附件JSON")
	private String attachmentsJson;

	@Schema(description = "计费方案JSON")
	private String billingPlanJson;

	@Schema(description = "结算生成规则JSON")
	private String settlementRuleJson;

	@Schema(description = "对账配置JSON")
	private String reconciliationJson;

	@Schema(description = "变更记录JSON")
	private String changeRecordJson;

	@Schema(description = "变更内容")
	private String changeContent;

	@Schema(description = "变更原因")
	private String changeReason;

	@Schema(description = "终止原因")
	private String terminateReason;

	@Schema(description = "备注")
	private String remark;

}
