
package org.sky.scientific.pojo.entity;

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

import java.io.Serial;

/**
 * 研发项目固定资产清单
 *
 * @author Kd
 * @since 2025-06-29
 */
@Data
@TableName("kd_xm_fixed_asset")
@EqualsAndHashCode(callSuper = true)
@Schema
public class XmFixedAsset extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "所属年月，如：202505")
	@NotBlank(message = "请选择所属年月")
	private String yearAndMonth;

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

	@NotNull(message = "请选择资产")
	@Schema(description = "资产ID")
	private Long assetId;

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

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

	@Schema(description = "资产编码")
	@NotNull(message = "资产编码")
	private String zcbm;

	@Schema(description = "研发分摊率(N)")
	@TableField(value = "yfftv")
	private Double yanfaFenTanLv;

	@Schema(description = "分摊率确定依据")
	@TableField(value = "ftvqdyj")
	private String fenTanLvQueDingYiJu;

	@TableField(exist = false)
	@Schema(description = "资产信息",hidden = true)
	private AssetEntity asset;
}
