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

import java.util.Date;
import java.util.List;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.time.LocalDate;
import java.time.LocalTime;

/**
 * 第二课堂-场馆-预约记录 Entity
 *
 * @author zhanghaijun
 * @date 2022-04-21 19:37:41
 */
@Data
public class EduSecondClassVenueOrder {

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

    @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;

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

    /**
     * 场馆部门id
     */
    @ApiModelProperty(value = "场馆部门id")
    @TableField("dept_id")
    private Long deptId;

    /**
     * 场馆id
     */
    @ApiModelProperty(value = "场馆id")
    @TableField("venue_id")
    private Long venueId;

    /**
     * 讲解员id
     */
    @ApiModelProperty(value = "讲解员id")
    @TableField("guide_id")
    private Long guideId;

    /**
     * 参观日期
     */
    @ApiModelProperty(value = "参观日期")
    @TableField("date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate date;

    /**
     * 参观开始时间
     */
    @ApiModelProperty(value = "参观开始时间")
    @TableField("start_time")
    @DateTimeFormat(pattern = "HH:mm")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    private LocalTime startTime;

    /**
     * 参观结束时间
     */
    @ApiModelProperty(value = "参观结束时间")
    @TableField("end_time")
    @DateTimeFormat(pattern = "HH:mm")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    private LocalTime endTime;

    /**
     * 预约状态，0-有效
     */
    @ApiModelProperty(value = "预约状态，0-有效")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("用户id")
    private String userId;

    @ApiModelProperty("用户手机号")
    private String userMobile;

    @ApiModelProperty("游客列表")
    private transient List<EduSecondClassVenueOrderMember> memberList;
}