package com.ruoyi.info.collection.domain.dto;

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 jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 亲属资产信息DTO
 *
 * @author ruoyi
 * @date 2026-03-12
 */
@Data
@Schema(description = "亲属资产信息")
public class CcdiAssetInfoDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 资产大类 */
    @NotBlank(message = "资产大类不能为空")
    @Size(max = 20, message = "资产大类长度不能超过20个字符")
    @Schema(description = "资产大类")
    private String assetMainType;

    /** 资产小类 */
    @NotBlank(message = "资产小类不能为空")
    @Size(max = 50, message = "资产小类长度不能超过50个字符")
    @Schema(description = "资产小类")
    private String assetSubType;

    /** 资产名称 */
    @NotBlank(message = "资产名称不能为空")
    @Size(max = 200, message = "资产名称长度不能超过200个字符")
    @Schema(description = "资产名称")
    private String assetName;

    /** 产权占比 */
    @Schema(description = "产权占比")
    private BigDecimal ownershipRatio;

    /** 购买/评估日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "购买/评估日期")
    private Date purchaseEvalDate;

    /** 资产原值 */
    @Schema(description = "资产原值")
    private BigDecimal originalValue;

    /** 当前估值 */
    @NotNull(message = "当前估值不能为空")
    @Schema(description = "当前估值")
    private BigDecimal currentValue;

    /** 估值截止日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "估值截止日期")
    private Date valuationDate;

    /** 资产状态 */
    @NotBlank(message = "资产状态不能为空")
    @Size(max = 10, message = "资产状态长度不能超过10个字符")
    @Schema(description = "资产状态")
    private String assetStatus;

    /** 备注 */
    @Size(max = 500, message = "备注长度不能超过500个字符")
    @Schema(description = "备注")
    private String remarks;
}
