package com.casic.missiles.modular.system.model;

import java.io.Serializable;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 组织机构业务支持配置
 * </p>
 *
 * @author lwh123
 * @since 2019-05-28
 */
@TableName("config_dept_permission")
@Data
public class DeptPermission extends Model<DeptPermission> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "ID", type = IdType.ID_WORKER)
    private Long id;
    /**
     * 部门主键
     */
    @TableField("DEPTID")
    private Long deptid;
    /**
     * 支持通讯方式
     */
    @TableField("COMMUNICATION")
    @JSONField(serialize = false)
    private String communication;
    /**
     * 支持井类型
     */
    @TableField("WELL_TYPE")
    @JSONField(serialize = false)
    private String wellType;
    /**
     * 支持设备类型
     */
    @TableField("DEVICE_TYPE")
    @JSONField(serialize = false)
    private String deviceType;
    /**
     * 默认城市区划
     */
    private String area;
    /**
     * 使用地图（0百度，1高德，2arcgis）
     */
    @TableField("MAP")
    private String map;
    @TableField(exist = false)
    private List<String> wellTypes;
    @TableField(exist = false)
    private List<String> deviceTypes;
    @TableField(exist = false)
    private List<String> communications;
    private String lng;
    private String lat;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "DeptPermission{" +
                "id=" + id +
                ", deptid=" + deptid +
                ", communication=" + communication +
                ", wellType=" + wellType +
                ", deviceType=" + deviceType +
                ", area=" + area +
                ", map=" + map +
                "}";
    }
}
