package com.zcxk.charge.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zcxk.core.common.pojo.ProgramItem;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * sms_scene
 * @author: WYY
 * @date 2020-11-17 21:15
 */
@Data
@TableName("sms_scene")
public class SceneEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 主键 */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 租户标识 */
    @ApiModelProperty(value = "租户标识")
    private String tenantId;

    /** 上级场景 */
    @ApiModelProperty(value = "上级场景")
    private Long parentSceneId;

    /** 上级场景IDS */
    @ApiModelProperty(value = "上级场景IDS")
    private String parentSceneIds;

    /** 场景名称 */
    @ApiModelProperty(value = "场景名称")
    private String sceneName;

    /** 所属公司 */
    @ApiModelProperty(value = "所属公司")
    private Long companyOrgId;

    /** 所属部门 */
    @ApiModelProperty(value = "所属部门")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long deptOrgId;

    /** 所属公司 */
    @ApiModelProperty(value = "所属公司")
    @TableField(exist = false)
    private String companyOrgName;

    /** 所属部门 */
    @ApiModelProperty(value = "所属部门")
    @TableField(exist = false)
    private String deptOrgName;

    /** 场景类型 */
    @ApiModelProperty(value = "场景类型")
    private Long sceneTypeId;

    /** 场景类型 */
    @ApiModelProperty(value = "场景类型")
    @TableField(exist = false)
    private String sceneTypeName;

    /** 状态 */
    @ApiModelProperty(value = "状态")
    private Long enableState;

    /** 投运时间 */
    @ApiModelProperty(value = "投运时间",example = "2020-12-12")
    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
    private Date runTime;

    /** 地址 */
    @ApiModelProperty(value = "地址")
    private String address;

    /** 经度 */
    @ApiModelProperty(value = "经度")
    private BigDecimal pointX;

    /** 纬度 */
    @ApiModelProperty(value = "纬度")
    private BigDecimal pointY;

    /** 纬度 */
    @ApiModelProperty(value = "备注")
    private String remark;

    /** 数据删除标记 */
    @TableLogic
    @ApiModelProperty(value = "数据删除标记")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间",example = "2020-12-12 12:12:12")
    private Date dateCreate;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    /** 更新者 */
    @ApiModelProperty(value = "更新者")
    private String updateBy;
    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间",example = "2020-12-12 12:12:12")
    private Date dateUpdate;

    @ApiModelProperty(value ="权限",hidden = true)
    @TableField(exist = false)
    @JsonIgnore
    private List<ProgramItem> programItems;

    @ApiModelProperty(value="用户权限类型")
    @TableField(exist = false)
    @JsonIgnore
    private Integer permissonType;

    /** 用户类型 */
    @ApiModelProperty(value = "用户类型(-9999 超管 -999普通用户 2普通用户)")
    @TableField(exist = false)
    @JsonIgnore
    private String userType;


    @ApiModelProperty(value = "子类", position = 100)
    @TableField(exist = false)
    private List<SceneEntity> children;

    @ApiModelProperty(value = "场景图片", position = 100)
    @TableField(exist = false)
    private List<SceneImageEntity> sceneImages;

    /** 一级场景名称 */
    @ApiModelProperty(value = "一级场景名称",hidden = true)
    @TableField(exist = false)
    private String parentSceneName;

    /** 是否报警 */
    @ApiModelProperty(value = "是否报警(0不报警1报警)")
    @TableField(exist = false)
    private Integer isAlarm;
}
