package com.srs.dormitory.domain.Dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class AddRepairDto {

    @ApiModelProperty("学号，外键，关联到学生表")
    @JsonIgnore
    private String stuNo;
    @ApiModelProperty("宿舍ID，外键，关联到宿舍表")
    private Long dormId;
    @ApiModelProperty("期望上门维修时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expectedVisitTime;
    @NotEmpty(message = "报修内容描述不能为空")
    private String description;
    @NotNull
    @Size(min = 10, message = "报修内容至少需要10个字符")
    private String content;
    @NotEmpty(message = "照片不能为空")
    private List<String> photos;

}
