package com.usoftchina.qywx.sdk.dto;

import java.util.List;

/**
 * @author yingp
 */
public class GetCheckinOptionResp extends BaseResp{

    private List<CheckinOption> info;

    public List<CheckinOption> getInfo() {
        return info;
    }

    public void setInfo(List<CheckinOption> info) {
        this.info = info;
    }

    public static class CheckinOption {
        /**
         * 用户id
         */
        private String userid;
        /**
         * 打卡规则
         */
        private CheckinGroup group;

        public String getUserid() {
            return userid;
        }

        public void setUserid(String userid) {
            this.userid = userid;
        }

        public CheckinGroup getGroup() {
            return group;
        }

        public void setGroup(CheckinGroup group) {
            this.group = group;
        }
    }

    public static class CheckinGroup {
        /**
         * 打卡规则类型。1：固定时间上下班；2：按班次上下班；3：自由上下班 。
         */
        private Integer grouptype;
        /**
         * 打卡规则id
         */
        private Integer groupid;
        /**
         * 打卡时间
         */
        private List<CheckinDate> checkindate;
        /**
         * 特殊日期
         */
        private List<SpecialDay> spe_workdays;
        private List<SpecialDay> spe_offdays;
        /**
         * 是否同步法定节假日
         */
        private Boolean sync_holidays;
        /**
         * 打卡规则名称
         */
        private String groupname;
        /**
         * 是否打卡必须拍照
         */
        private Boolean need_photo;
        /**
         * WiFi打卡地点信息
         */
        private List<WifiMacInfo> wifimac_infos;
        /**
         * 是否备注时允许上传本地图片
         */
        private Boolean note_can_use_local_pic;
        /**
         * 是否非工作日允许打卡
         */
        private Boolean allow_checkin_offworkday;
        /**
         * 是否允许异常打卡时提交申请
         */
        private Boolean allow_apply_offworkday;
        /**
         * 位置打卡地点信息
         */
        private List<LocInfo> loc_infos;

        public Integer getGrouptype() {
            return grouptype;
        }

        public void setGrouptype(Integer grouptype) {
            this.grouptype = grouptype;
        }

        public Integer getGroupid() {
            return groupid;
        }

        public void setGroupid(Integer groupid) {
            this.groupid = groupid;
        }

        public List<CheckinDate> getCheckindate() {
            return checkindate;
        }

        public void setCheckindate(List<CheckinDate> checkindate) {
            this.checkindate = checkindate;
        }

        public List<SpecialDay> getSpe_workdays() {
            return spe_workdays;
        }

        public void setSpe_workdays(List<SpecialDay> spe_workdays) {
            this.spe_workdays = spe_workdays;
        }

        public List<SpecialDay> getSpe_offdays() {
            return spe_offdays;
        }

        public void setSpe_offdays(List<SpecialDay> spe_offdays) {
            this.spe_offdays = spe_offdays;
        }

        public Boolean getSync_holidays() {
            return sync_holidays;
        }

        public void setSync_holidays(Boolean sync_holidays) {
            this.sync_holidays = sync_holidays;
        }

        public String getGroupname() {
            return groupname;
        }

        public void setGroupname(String groupname) {
            this.groupname = groupname;
        }

        public Boolean getNeed_photo() {
            return need_photo;
        }

        public void setNeed_photo(Boolean need_photo) {
            this.need_photo = need_photo;
        }

        public List<WifiMacInfo> getWifimac_infos() {
            return wifimac_infos;
        }

        public void setWifimac_infos(List<WifiMacInfo> wifimac_infos) {
            this.wifimac_infos = wifimac_infos;
        }

        public Boolean getNote_can_use_local_pic() {
            return note_can_use_local_pic;
        }

        public void setNote_can_use_local_pic(Boolean note_can_use_local_pic) {
            this.note_can_use_local_pic = note_can_use_local_pic;
        }

        public Boolean getAllow_checkin_offworkday() {
            return allow_checkin_offworkday;
        }

        public void setAllow_checkin_offworkday(Boolean allow_checkin_offworkday) {
            this.allow_checkin_offworkday = allow_checkin_offworkday;
        }

        public Boolean getAllow_apply_offworkday() {
            return allow_apply_offworkday;
        }

        public void setAllow_apply_offworkday(Boolean allow_apply_offworkday) {
            this.allow_apply_offworkday = allow_apply_offworkday;
        }

        public List<LocInfo> getLoc_infos() {
            return loc_infos;
        }

        public void setLoc_infos(List<LocInfo> loc_infos) {
            this.loc_infos = loc_infos;
        }
    }

    public static class CheckinDate {
        /**
         * 工作日。若为固定时间上下班或自由上下班，则1到6分别表示星期一到星期六，0表示星期日；若为按班次上下班，则表示拉取班次的日期
         */
        private List<Integer> workdays;
        private List<CheckinTime> checkintime;
        /**
         * 弹性时间（毫秒）
         */
        private Long flex_time;
        /**
         * 下班不需要打卡
         */
        private Boolean noneed_offwork;
        /**
         * 打卡时间限制（毫秒）
         */
        private Long limit_aheadtime;

        public List<Integer> getWorkdays() {
            return workdays;
        }

        public void setWorkdays(List<Integer> workdays) {
            this.workdays = workdays;
        }

        public List<CheckinTime> getCheckintime() {
            return checkintime;
        }

        public void setCheckintime(List<CheckinTime> checkintime) {
            this.checkintime = checkintime;
        }

        public Long getFlex_time() {
            return flex_time;
        }

        public void setFlex_time(Long flex_time) {
            this.flex_time = flex_time;
        }

        public Boolean getNoneed_offwork() {
            return noneed_offwork;
        }

        public void setNoneed_offwork(Boolean noneed_offwork) {
            this.noneed_offwork = noneed_offwork;
        }

        public Long getLimit_aheadtime() {
            return limit_aheadtime;
        }

        public void setLimit_aheadtime(Long limit_aheadtime) {
            this.limit_aheadtime = limit_aheadtime;
        }
    }

    public static class CheckinTime {
        /**
         * 上班时间，表示为距离当天0点的秒数。
         */
        private Integer work_sec;
        /**
         * 下班时间，表示为距离当天0点的秒数。
         */
        private Integer off_work_sec;
        /**
         * 上班提醒时间，表示为距离当天0点的秒数。
         */
        private Integer remind_work_sec;
        /**
         * 下班提醒时间，表示为距离当天0点的秒数。
         */
        private Integer remind_off_work_sec;

        public Integer getWork_sec() {
            return work_sec;
        }

        public void setWork_sec(Integer work_sec) {
            this.work_sec = work_sec;
        }

        public Integer getOff_work_sec() {
            return off_work_sec;
        }

        public void setOff_work_sec(Integer off_work_sec) {
            this.off_work_sec = off_work_sec;
        }

        public Integer getRemind_work_sec() {
            return remind_work_sec;
        }

        public void setRemind_work_sec(Integer remind_work_sec) {
            this.remind_work_sec = remind_work_sec;
        }

        public Integer getRemind_off_work_sec() {
            return remind_off_work_sec;
        }

        public void setRemind_off_work_sec(Integer remind_off_work_sec) {
            this.remind_off_work_sec = remind_off_work_sec;
        }
    }

    public static class SpecialDay {
        /**
         * 特殊日期具体时间
         */
        private Long timestamp;
        /**
         * 特殊日期备注
         */
        private String notes;
        private List<CheckinTime> checkintime;

        public Long getTimestamp() {
            return timestamp;
        }

        public void setTimestamp(Long timestamp) {
            this.timestamp = timestamp;
        }

        public String getNotes() {
            return notes;
        }

        public void setNotes(String notes) {
            this.notes = notes;
        }

        public List<CheckinTime> getCheckintime() {
            return checkintime;
        }

        public void setCheckintime(List<CheckinTime> checkintime) {
            this.checkintime = checkintime;
        }
    }

    public static class WifiMacInfo {
        /**
         * WiFi打卡地点名称
         */
        private String wifiname;
        /**
         * WiFi打卡地点MAC地址/bssid
         */
        private String wifimac;

        public String getWifiname() {
            return wifiname;
        }

        public void setWifiname(String wifiname) {
            this.wifiname = wifiname;
        }

        public String getWifimac() {
            return wifimac;
        }

        public void setWifimac(String wifimac) {
            this.wifimac = wifimac;
        }
    }

    public static class LocInfo {
        /**
         * 位置打卡地点纬度，是实际纬度的1000000倍，与腾讯地图一致采用GCJ-02坐标系统标准
         */
        private Long lat;
        /**
         * 位置打卡地点经度，是实际经度的1000000倍，与腾讯地图一致采用GCJ-02坐标系统标准
         */
        private Long lng;
        /**
         * 位置打卡地点名称
         */
        private String loc_title;
        /**
         * 位置打卡地点详情
         */
        private String loc_detail;
        /**
         * 允许打卡范围（米）
         */
        private Integer distance;

        public Long getLat() {
            return lat;
        }

        public void setLat(Long lat) {
            this.lat = lat;
        }

        public Long getLng() {
            return lng;
        }

        public void setLng(Long lng) {
            this.lng = lng;
        }

        public String getLoc_title() {
            return loc_title;
        }

        public void setLoc_title(String loc_title) {
            this.loc_title = loc_title;
        }

        public String getLoc_detail() {
            return loc_detail;
        }

        public void setLoc_detail(String loc_detail) {
            this.loc_detail = loc_detail;
        }

        public Integer getDistance() {
            return distance;
        }

        public void setDistance(Integer distance) {
            this.distance = distance;
        }
    }
}
