package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 用户预约信息表（订桌时间可往后延续）
 *
 * @author system
 */
@Data
@JsonInclude
@TableName("user_reservation")
@ApiModel(value = "UserReservation对象", description = "用户预约信息表")
public class UserReservation {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "预约号（券码）")
    @TableField("reservation_no")
    private String reservationNo;

    @ApiModelProperty(value = "用户ID")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "门店ID")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "预约日期")
    @TableField("reservation_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date reservationDate;

    @ApiModelProperty(value = "预约开始时间 HH:mm")
    @TableField("start_time")
    private String startTime;

    @ApiModelProperty(value = "预约结束时间 HH:mm（可往后延续）")
    @TableField("end_time")
    private String endTime;

    @ApiModelProperty(value = "预约人数")
    @TableField("guest_count")
    private Integer guestCount;

    @ApiModelProperty(value = "偏好区域/分类ID（如大厅/包间）")
    @TableField("category_id")
    private Integer categoryId;

    @ApiModelProperty(value = "预约状态 0:待确认 1:已确认 2:已到店 3:已取消 4:未到店超时")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "实际到店时间")
    @TableField("actual_arrival_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date actualArrivalTime;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "预约人姓名")
    @TableField("reservation_user_name")
    private String reservationUserName;

    @ApiModelProperty(value = "预约人性别:0:男,1:女")
    @TableField("reservation_user_gender")
    private String reservationUserGender;

    @ApiModelProperty(value = "预约人电话")
    @TableField("reservation_user_phone")
    private String reservationUserPhone;

    @ApiModelProperty(value = "取消原因（商家端取消）")
    @TableField("reason")
    private String reason;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

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

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;
}
