package com.usky.sas.service.dto.agbox;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.util.List;

/**
 * AG 接口 getPerson 响应 - 在册人员分页
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class PersonVo {

    private PersonResult result;

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class PersonResult {
        /** 人员列表 */
        private List<PersonMsg> person;
        /** 当前页数量 */
        private Long count;
        /** 总页数 */
        private Integer totalPage;
    }

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class PersonMsg {
        private String personCode;
        private String name;
        private Integer credentialType;
        private String credentialNo;
        private String phone1;
        private String phone2;
        private String phone3;
        /** 人员类型编码（对应 sas_person.people_type_code） */
        private Integer personTypeCode;
        /** 出入类型编码（对应 sas_person.person_entrance_type_code） */
        private Integer personEntranceTypeCode;
        private Integer entranceTypeCode;
        private String picId;
        /** 人脸图片（AG 可能返回 url/path 结构） */
        private FacePicUrl facePicUrl;
        private String updateTime;
        private String createTime;
        private String companyCode;
        private String origin;
        private String placeOfBirth;
        private Integer educationCode;
        private Integer maritalStatusCode;
        private String nationalityCode;
    }

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class FacePicUrl {
        private String url;
        private String path;
    }
}
