
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.Max;
import jakarta.validation.constraints.Min;
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_asset")
@Schema(description = "Asset对象")
@EqualsAndHashCode(callSuper = true)
public class AssetEntity extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

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

	@Schema(description = "资产名称")
	private String zcmc;

	@Schema(description = "所属年月")
	private String yearAndMonth;

	@Schema(description = "资产类别")
	private String zclb;

	@Schema(description = "功率")
	private String gl;

	@Schema(description = "用途")
	private String yt;

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

	@Schema(description = "使用寿命/月")
	private Integer sysm;

	@Schema(description = "已使用月数")
	private Integer ysysm;

	@Schema(description = "资产原值（元）")
	private BigDecimal zcyz;

	@Schema(description = "净残值（%）")
	@Min(value = 0)
	@Max(value = 1)
	private Double jcz;

	@Schema(description = "月折旧额/月摊销额（元）")
	private BigDecimal yzje;

	@Schema(description = "总工时")
	private Double zgs;

	@Schema(description = "状态，0：正常，1：停用，2：已足额折旧，3：改造，4：资产处置")
	private Integer status;

}
