
package org.sky.scientific.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
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 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-06-29
 */
@Data
@TableName("kd_xm_wwxm_cost")
@EqualsAndHashCode(callSuper = true)
public class XmWwxmCost extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

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

	@Schema(description = "委外id，kd_xm_wwxm的主键")
	@NotNull(message = "请选择委外项目")
	private Long wwId;

	@Schema(description = "日期")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	@NotNull(message = "请选择日期")
	private Date payDate;

	@Schema(description = "委外金额（付款金额）")
	@NotNull(message = "请输入委外金额")
	private BigDecimal payAmount;
}
