package com.yida.data.common.core.entity.camera;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author ccl
 */
@Data
public class EduCameraAreaGroup {

    @ApiModelProperty("")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("'学校id'")
    private Long schoolId;
    @ApiModelProperty("'上级父id'")
    private Long parentId;
    @ApiModelProperty("'区域名称'")
    private String name;
    @ApiModelProperty("'排序'")
    private Integer sort;
    @ApiModelProperty("'0为班级，1为其他'")
    private Integer type;

    @ApiModelProperty("'0为默认不展示，1为展示'")
    private Integer status;

    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("'创建时间'")
    private LocalDateTime createDate;

    @TableField(value = "create_id", fill = FieldFill.INSERT)
    @ApiModelProperty("修改人id")
    private Long createId;
    @ApiModelProperty("'0未删除，1删除'")
    private Integer delFlag;

    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("'修改时间'")
    private LocalDateTime updateDate;

    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    @ApiModelProperty("修改人id")
    private Long updateId;

    @TableField(exist = false)
    private List<EduCameraAreaGroup> areaGroupList;
}
