package com.amms.domain;


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

import java.util.Date;
import java.util.List;

/**
 * 预约对象 reservation
 */
public class Reservation {

    /** 预约id（主表ID） */
    private Long id;

    /** 预约发起者id（关联sys_user.id） */
    private Long userId;

    /** 预约发起者username*/
    private String username;

    /** 预约发起者nickname*/
    private String nickname;

    /** 预约时段id（关联reservation_time_slot.id） */
    private Long timeSlotId;

    /** 预约时段信息 */
    private ReservationTimeSlot reservationTimeSlot;

    /** 预约总人数（与明细表记录数一致） */
    private Integer totalVisitors;

    /** 预约时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    private Date reserveTime;

    /** 预约凭证二维码（整单唯一） */
    private String qrCode;

    /** 整单状态（0待审核 1已通过 2已取消 3已驳回） */
    private Long status;

    /** 审核者id（关联sys_user.id） */
    private Long updater;

    /** 查询开始日期（根据预约时段的日期） */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /** 查询结束日期（根据预约时段的日期） */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 备注 */
    private String remark;

    /** 预约包含的游客信息*/
    private List<ReservationVisitor>  reservationVisitors;


    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setTimeSlotId(Long timeSlotId) {
        this.timeSlotId = timeSlotId;
    }

    public Long getTimeSlotId() {
        return timeSlotId;
    }

    public void setTotalVisitors(Integer totalVisitors) {
        this.totalVisitors = totalVisitors;
    }

    public Integer getTotalVisitors() {
        return totalVisitors;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    public String getQrCode() {
        return qrCode;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return status;
    }



    public void setUpdater(Long updater) {
        this.updater = updater;
    }

    public Long getUpdater() {
        return updater;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<ReservationVisitor> getReservationVisitors() {
        return reservationVisitors;
    }

    public void setReservationVisitors(List<ReservationVisitor> reservationVisitors) {
        this.reservationVisitors = reservationVisitors;
    }

    public void setReserveTime(Date reserveTime) {
        this.reserveTime = reserveTime;
    }

    public Date getReserveTime() {
        return reserveTime;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public ReservationTimeSlot getReservationTimeSlot() {
        return reservationTimeSlot;
    }

    public void setReservationTimeSlot(ReservationTimeSlot reservationTimeSlot) {
        this.reservationTimeSlot = reservationTimeSlot;
    }

    @Override
    public String toString() {
        return "Reservation{" +
            "id=" + id +
            ", userId=" + userId +
            ", timeSlotId=" + timeSlotId +
            ", totalVisitors=" + totalVisitors +
            ", qrCode=" + qrCode +
            ", status=" + status +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", updater=" + updater +
            ", remark=" + remark +
        '}';
    }
}
