
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.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
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_intangible_asset")
@EqualsAndHashCode(callSuper = true)
@Schema
public class XmIntangibleAsset extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

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

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

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

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

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

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

	@Schema(description = "使用人")
	@NotNull(message = "请选择使用人")
	private String userUnicode;

	@Schema(description = "使用人名称")
//	@NotNull(message = "使用人名称不能为空")
	private String userName;

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