package com.ruoyi.zdsz.domain.bo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.core.validate.QueryGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 开栓|安检|维修业务对象 z_comprehensive
 *
 * @author ruoyi
 * @date 2023-12-27
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ZComprehensiveBo extends BaseEntity {

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = {EditGroup.class})
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 小区id
     */
    @NotBlank(message = "小区id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String areaId;

    /**
     * 楼栋id
     */
    @NotBlank(message = "楼栋id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String buildingId;

    /**
     * 单元id
     */
    @NotBlank(message = "单元id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String unitId;
    /**
     * 行政区
     */
    @NotBlank(message = "行政区不能为空", groups = {AddGroup.class, EditGroup.class})
    private String district;

    /**
     * 房间id
     */
    @NotBlank(message = "房间id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String houseId;

    /**
     * 类型
     */
    @NotBlank(message = "类型不能为空", groups = {AddGroup.class, EditGroup.class, QueryGroup.class})
    private String type;

    /**
     * 安检是否合格
     */
//    @NotBlank(message = "安检是否合格不能为空", groups = {AddGroup.class, EditGroup.class})
    private String isQualified;

//    public List<String> getPicIds() {
//        return picIds;
//    }
//
//    public void setPicIds(List<String> picIds) {
//        if (picIds != null && (!picIds.isEmpty())) {
//            this.picIds = picIds;
//        }
//        else {
//            throw new IllegalArgumentException("照片必须上传");
//        }
//    }

    /**
     * 备注
     */
//    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


    //职工
    private String personBy;
    //开始时间
    private String constructTime;
    //结束时间
    private String constructEndTime;


    @JsonProperty(value = "picIds")
    private List<String> picIds;

}
