
package org.sky.scientific.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.sky.core.tenant.mp.TenantEntity;
import org.sky.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 研发费用支出明细账 实体类
 *
 * @author Kd
 * @since 2025-07-30
 */
@Data
@TableName("kd_xm_cost_details")
@Schema(description = "XmCostDetails对象")
@EqualsAndHashCode(callSuper = true)
public class XmCostDetailsEntity extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "所属年月，如：202505")
	private String yearAndMonth;

	@Schema(description = "项目ID")
	private Long xmId;

	@Schema(description = "项目编号")
	@TableField(exist = false)
	private String xmbh;

	@Schema(description = "项目名称")
	@TableField(exist = false)
	private String xmmc;

	@Schema(description = "日期")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private Date recordDate;

	@Schema(description = "凭证字号")
	private String voucherNumber;

	@Schema(description = "企业科目id")
	private Long eSubjectId;

	@Schema(description = "企业科目代码")
	private String eSubjectCode;

	@Schema(description = "企业科目名称")
	private String eSubjectName;

	@Schema(description = "摘要")
	private String digest;

	@Schema(description = "金额")
	private BigDecimal amount;

	@Schema(description = "账簿名称")
	private String cashbook;
}
