CarConfigInfo.java 2.81 KB
package com.bsth.entity.schedule;

import com.bsth.entity.Bus;
import com.bsth.entity.Line;

import javax.persistence.*;
import java.util.Date;

/**
 * 车辆配置信息。
 */
@Entity
@Table(name = "bsth_c_s_ccinfo")
public class CarConfigInfo {

    /** 主健Id */
    @Id
    @GeneratedValue
    private Long id;

    /** TODO:等其他实体类完整后,做关联引用 */

    /** 线路关联 */
    @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
    private Line xl;
    /** 车辆关联 */
    @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
    private Bus cl;


    /** 早班时间(格式:HH:mm) */
    @Column(length = 5)
    private String zbsj;
    /** 末班时间(格式:HH:mm) */
    @Column(length = 5)
    private String mbsj;

    /** 启用日期 */
    private Date qyrq;
    /** 终止日期 */
    private Date zzrq;
    /** 停车点(TODO:这个不知道是否要关联)( */
    private String tcd;
    /** 受否切换(TODO:不懂) */
    private int isSwitch;

    // 创建日期
    @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
    private Date createDate;
    // 修改日期
    @Column(name = "update_date", columnDefinition = "TIMESTAMP  DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
    private Date updateDate;

    public Long getId() {
        return id;
    }

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

    public Line getXl() {
        return xl;
    }

    public void setXl(Line xl) {
        this.xl = xl;
    }

    public Bus getCl() {
        return cl;
    }

    public void setCl(Bus cl) {
        this.cl = cl;
    }

    public Date getQyrq() {
        return qyrq;
    }

    public void setQyrq(Date qyrq) {
        this.qyrq = qyrq;
    }

    public Date getZzrq() {
        return zzrq;
    }

    public void setZzrq(Date zzrq) {
        this.zzrq = zzrq;
    }

    public String getTcd() {
        return tcd;
    }

    public void setTcd(String tcd) {
        this.tcd = tcd;
    }

    public int getIsSwitch() {
        return isSwitch;
    }

    public void setIsSwitch(int isSwitch) {
        this.isSwitch = isSwitch;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public String getZbsj() {
        return zbsj;
    }

    public void setZbsj(String zbsj) {
        this.zbsj = zbsj;
    }

    public String getMbsj() {
        return mbsj;
    }

    public void setMbsj(String mbsj) {
        this.mbsj = mbsj;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}