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

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 宿舍宿管
 *
 * @author ZYJ
 * @date 2022/8/22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("edu_dormitory_master")
public class EduDormitoryMaster implements Serializable {

    private static final long serialVersionUID = 3934033510317742152L;

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

    @ApiModelProperty("创建时间")
    @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("创建人id")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    @ApiModelProperty("最后修改时间")
    @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("最后修改人id")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    @ApiModelProperty("删除标识")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    @ApiModelProperty("宿舍楼id")
    @TableField("dormitory_id")
    private Long dormitoryId;

    @ApiModelProperty("宿管id")
    private Long masterId;

    @ApiModelProperty("学校id")
    @TableField("school_id")
    private Long schoolId;
}
