package com.persagy.domain;

import com.persagy.util.DateUtil;

import java.text.ParseException;
import java.util.Date;

/**
 * Created by Admiral on 2018/1/18.
 */
public class Reservation {
    private int id;

    private int roomId;

    private String user;

    private String mobile;

    private Date date;

    private Date beginTime;

    private Date endTime;

    private String mark;

    private String enterUsers;
    private String department;
    private String theme;
    private int alarmminute;

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public int getAlarmminute() {
        return alarmminute;
    }

    public void setAlarmminute(int alarmminute) {
        this.alarmminute = alarmminute;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getEnterUsers() {
        return enterUsers;
    }

    public void setEnterUsers(String enterUsers) {
        this.enterUsers = enterUsers;
    }

    public int getId() {
        return id;
    }

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

    public int getRoomId() {
        return roomId;
    }

    public void setRoomId(int roomId) {
        this.roomId = roomId;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getDate() {
        return DateUtil.formatStr(DateUtil.date,date);
    }

    public void setDate(Date date) {
        this.date = date;
    }
    public void setDate(String date) {
        try {
            this.date = DateUtil.parseDate(DateUtil.date,date);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    public String getBeginTime() {
        return DateUtil.formatStr(DateUtil.time,beginTime);
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }
    public void setBeginTime(String beginTime) {
        try {
            this.beginTime = DateUtil.parseDate(DateUtil.time,beginTime);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
    public String getEndTime() {
        return DateUtil.formatStr(DateUtil.time,endTime);
    }

    public void setEndTime(String endTime) {
        try {
            this.endTime = DateUtil.parseDate(DateUtil.time,endTime);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }
}
