
package model;

import java.util.Date;

public class LeaveRequest {
    private int id;                  // 数据库主键ID
    private Student student;         // 学生信息
    private Date startTime;          // 开始时间
    private Date endTime;            // 结束时间
    private double duration;         // 时长
    private String location;         // 外出地址
    private String reasonType;       // 外出事由类型
    private String reasonDetail;     // 详细事由
    private boolean isLeavingCity;   // 是否离津
    private ApprovalStatus status;   // 审批状态
    private Teacher approver;        // 审批人
    private String approvalComment;  // 审批意见
    private Date requestTime;        // 申请时间
    private Date approvalTime;       // 审批时间

    // 构造方法

    public LeaveRequest(int id, Student student, Date startTime, Date endTime, double duration, String location,
                        String reasonType, String reasonDetail, boolean isLeavingCity, ApprovalStatus status,
                        Teacher approver, String approvalComment, Date requestTime, Date approvalTime) {
        this.id = id;
        this.student = student;
        this.startTime = startTime;
        this.endTime = endTime;
        this.duration = duration;
        this.location = location;
        this.reasonType = reasonType;
        this.reasonDetail = reasonDetail;
        this.isLeavingCity = isLeavingCity;
        this.status = status;
        this.approver = approver;
        this.approvalComment = approvalComment;
        this.requestTime = requestTime;
        this.approvalTime = approvalTime;
    }
    // getter和setter方法

    public int getId() {
        return id;
    }

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

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

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

    public double getDuration() {
        return duration;
    }

    public void setDuration(double duration) {
        this.duration = duration;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getReasonType() {
        return reasonType;
    }

    public void setReasonType(String reasonType) {
        this.reasonType = reasonType;
    }

    public String getReasonDetail() {
        return reasonDetail;
    }

    public void setReasonDetail(String reasonDetail) {
        this.reasonDetail = reasonDetail;
    }

    public boolean isLeavingCity() {
        return isLeavingCity;
    }

    public void setLeavingCity(boolean leavingCity) {
        isLeavingCity = leavingCity;
    }

    public ApprovalStatus getStatus() {
        return status;
    }

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

    public Teacher getApprover() {
        return approver;
    }

    public void setApprover(Teacher approver) {
        this.approver = approver;
    }

    public String getApprovalComment() {
        return approvalComment;
    }

    public void setApprovalComment(String approvalComment) {
        this.approvalComment = approvalComment;
    }

    public Date getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(Date requestTime) {
        this.requestTime = requestTime;
    }

    public Date getApprovalTime() {
        return approvalTime;
    }

    public void setApprovalTime(Date approvalTime) {
        this.approvalTime = approvalTime;
    }
}