package com.zcxk.entity;

import com.baomidou.mybatisplus.annotation.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zcxk.model.ProgramItem;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * sms_scene_type
 * @author: WYY
 * @date 2020-11-17 19:31
 */
@Data
@TableName("sms_scene_type")
public class SceneTypeEntity 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 parentScenetypeId;

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

    /** 数据删除标记 */
    @ApiModelProperty(value = "数据删除标记")
    @TableLogic
    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<SceneTypeEntity> children;

}
