
package org.sky.scientific.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.sky.core.tenant.mp.TenantEntity;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * 长期待摊费用分配表 实体类
 *
 * @author Kd
 * @since 2025-07-24
 */
@Data
@TableName("kd_xm_cqdtfy")
@Schema(description = "XmCqdtfy对象")
@EqualsAndHashCode(callSuper = true)
public class XmCqdtfyEntity extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "所属年月，如：202505")
	@NotBlank(message = "yearAndMonth不能为空")
	private String yearAndMonth;

	@Schema(description = "项目ID")
	@NotNull(message = "请选择研发项目")
	private Long xmId;

	@Schema(description = "长期待摊费用编码")
	private String ctdtfybm;

	@Schema(description = "长期待摊费用名称")
	@NotBlank(message = "长期待摊费用名称不能为空")
	private String ctdtfymc;

	@Schema(description = "用途")
	private String yt;

	@Schema(description = "摊销开始日期，格式：2025-01")
//	@DateTimeFormat(pattern = DateUtil.PATTERN_YYYYMM)
//	@JsonFormat(pattern = DateUtil.PATTERN_YYYYMM)
	private String txksrq;

	@Schema(description = "使用寿命（月）")
	private Integer sysm;

	@Schema(description = "已使用月数")
	private Integer ysyys;

	@Schema(description = "资产原值")
	private BigDecimal zcyz;

	@Schema(description = "月摊销额（每节点/套）（K）")
	private BigDecimal ytxe;

	@Schema(description = "使用占比，如：0.5")
	private BigDecimal syzb;

	@Schema(description = "占比依据")
	private String zbyj;

	@Schema(description = "分摊依据")
	private String ftyj;

}
