
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.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.sky.core.tenant.mp.TenantEntity;

import java.io.Serial;
import java.util.List;

/**
 * 会计/加计扣除/高新-研发项目清单 实体类
 *
 * @author Kd
 * @since 2025-06-29
 */
@Data
@TableName("kd_xm_finance")
 @EqualsAndHashCode(callSuper = true)
public class XmFinanceEntity extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "所属年份")
	@NotBlank(message = "参数yearAndMonth不能为空")
	private String yearAndMonth;

	@Schema(description = "研发项目ID")
//	@NotNull(message = "研发项目ID不能为空")
	private Long xmId;

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

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

	@NotNull(message = "参数type不能为空")
	@Schema(description = "类型，1：会计，2：加计扣除，3：高新")
	private Integer type;

	@NotEmpty(message = "请选择研发项目，可多选")
	@Schema(description = "新增时将多选的项目id放入数组")
	@TableField(exist = false)
	private List<Long> xmIdList;
}
