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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

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

@Schema(description = "管理后台 - 服务工单新增/修改 Request VO")
@Data
public class ElderlyServiceOrderSaveReqVO {

    @Schema(description = "id（修改时必传）", example = "1")
    private Long id;

    @Schema(description = "姓名", example = "张三")
    private String elderName;

    @Schema(description = "性别", example = "1")
    private String elderSex;

    @Schema(description = "年龄", example = "80")
    private Integer elderAge;

    @Schema(description = "居住地址")
    private String elderAddress;

    @Schema(description = "身份证")
    private String idCard;

    @Schema(description = "服务项目")
    private String serviceItem;

    @Schema(description = "服务人员姓名", example = "李四")
    private String serviceName;

    @Schema(description = "下单时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime orderTime;

    @Schema(description = "服务开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime serviceBeginTime;

    @Schema(description = "服务结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime serviceEndTime;

    @Schema(description = "服务时长")
    private BigDecimal serviceHour;

    @Schema(description = "是否过期", example = "0")
    private String isExpire;

    @Schema(description = "工单状态", example = "0")
    private String orderStatus;

    @Schema(description = "租户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long tenantId;

    /**
     * 图片地址
     */
    @Schema(description = "图片地址")
    private String image;
}

