package com.persagy.dmp.basic.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.persagy.dmp.basic.validations.QueryClassCodeVadition;
import com.persagy.dmp.basic.validations.QueryFloorIdVadition;
import com.persagy.dmp.basic.validations.QuerySpaceIdVadition;
import com.persagy.dmp.basic.validations.QuerySystemIdVadition;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Set;

/***
 * @Description: 统一的请求体封装对象
 * @author: lijie
 * @Date:2020/7/9 10:35
 * Update By lijie 2020/7/9 10:35
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SimpleRequestData {

    /**账号id*/
    @JsonAlias({"user_id"})
    @JsonProperty("userId")
    @JSONField(name = "userId",alternateNames = {"user_id"})
    private String userId;
    /** 分页页码,从 1 开始 */
    @JsonAlias({"page"})
    @JsonProperty("page")
    @JSONField(name = "page",alternateNames = {"page"})
    private Long page;
    /** 每页行数 */
    @JsonAlias({"page_size","size","pageSize"})
    @JsonProperty("size")
    @JSONField(name = "size",alternateNames = {"page_size","size","pageSize"})
    private Long size;
    /** 筛选关键字,本地名称筛选 */
    @JsonAlias({"keyword"})
    @JsonProperty("keyword")
    @JSONField(name = "keyword",alternateNames = {"keyword"})
    private String keyword;
    /** 集团编码 */
    @JsonAlias({"group_code","groupCode"})
    @JsonProperty("groupCode")
    @JSONField(name = "groupCode",alternateNames = {"group_code","groupCode"})
    private String groupCode;
    /** 项目id */
    @JsonAlias({"project_id","projectId"})
    @JsonProperty("projectId")
    @JSONField(name = "projectId",alternateNames = {"project_id","projectId"})
    private String projectId;
    /** 项目id数组 */
    @JsonAlias({"project_ids","projectIds"})
    @JsonProperty("projectIds")
    @JSONField(name = "projectIds",alternateNames = {"project_ids","projectIds"})
    private Set<String> projectIds;
    /** 建筑id */
    @JsonAlias({"building_id","buildingId"})
    @JsonProperty("buildingId")
    @JSONField(name = "buildingId",alternateNames = {"building_id","buildingId"})
    private String buildingId;
    /** 楼层id */
    @JsonAlias({"floor_id","floorId"})
    @JsonProperty("floorId")
    @JSONField(name = "floorId",alternateNames = {"floor_id","floorId"})
    @NotBlank(message = "缺少必填项:楼层id", groups = {QueryFloorIdVadition.class})
    private String floorId;
    /** 楼层id */
    @JsonAlias({"space_id","spaceId"})
    @JsonProperty("spaceId")
    @JSONField(name = "spaceId",alternateNames = {"space_id","spaceId"})
    @NotBlank(message = "缺少必填项:空间id", groups = {QuerySpaceIdVadition.class})
    private String spaceId;
    /** 系统id */
    @JsonAlias({"system_id","systemId"})
    @JsonProperty("systemId")
    @JSONField(name = "systemId",alternateNames = {"system_id","systemId"})
    @NotBlank(message = "缺少必填项:空间id", groups = {QuerySystemIdVadition.class})
    private String systemId;
}
