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

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yida.data.common.core.entity.user.EduStaff;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 宿舍楼 Entity
 *
 * @author wjm
 * @date 2021-09-14 17:42:11
 */
@Data
@TableName("edu_dormitory")
public class EduDormitory {

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

    /**
     *
     */
    @ApiModelProperty(value = "")
    @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")
    private LocalDateTime createDate;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @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")
    private LocalDateTime updateDate;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 宿舍楼名称
     */
    @ApiModelProperty(value = "宿舍楼名称")
    @TableField("name")
    private String name;

    /**
     * 宿管id
     */
    @ApiModelProperty(value = "宿管id")
    private Long masterId;

    /**
     * 楼层数量
     */
    @ApiModelProperty(value = "楼层数量")
    @TableField("floor_num")
    private Integer floorNum;

    /**
     * 学校id
     */
    @ApiModelProperty(value = "学校id")
    @TableField("school_id")
    private Long schoolId;

    @ApiModelProperty("宿舍楼的寝室列表 ")
    private transient List<EduDormitoryRoom> dormRoomList;

    @ApiModelProperty("宿管对应的职工信息")
    private transient List<EduStaff> eduStaffList;

    @ApiModelProperty("宿管id集合")
    private transient List<Long> masterIds;
}
