package cn.iocoder.yudao.module.system.controller.admin.biz.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

@Schema(description = "管理后台 - 长者追加固定费用 Request VO")
@Data
public class ElderlyFixedExpenseAppendReqVO {

    @Schema(description = "长者ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "长者ID不能为空")
    private Long elderId;

    @Schema(description = "收费项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001")
    @NotNull(message = "收费项ID不能为空")
    private Long itemId;

    @Schema(description = "收费项分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "床位费")
    @NotBlank(message = "收费项分类名称不能为空")
    private String itemCategoryName;

    @Schema(description = "收费项名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "单人间床位费")
    @NotBlank(message = "收费项名称不能为空")
    private String itemName;

    @Schema(description = "费用具体类型，1：床位费，2：护理费，3：膳食费，7：服务费等", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer type;

    @Schema(description = "单价(原价)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1800")
    @NotNull(message = "单价不能为空")
    @DecimalMin(value = "0", inclusive = false, message = "单价必须大于0")
    private BigDecimal amount;

    @Schema(description = "实际单价，不传默认等于单价", example = "1700")
    @DecimalMin(value = "0", inclusive = false, message = "实际单价必须大于0")
    private BigDecimal actualAmount;

    @Schema(description = "数量，不传默认 1", example = "1")
    private Integer count;

    @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2026-03-01")
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate startDate;

    @Schema(description = "结束时间，不传默认等于开始时间", example = "2026-03-31")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate endDate;

    @Schema(description = "备注", example = "手工补录")
    private String remark;

    @Schema(description = "机构ID，不传默认当前租户", example = "1")
    private Long tenantId;
}
