package com.jiayue.ipfcst.common.data.entity;

import com.jiayue.ipfcst.common.data.abst.AbstractBaseEntity;
import com.jiayue.ipfcst.common.data.constant.enums.HolidayTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * 假期日历实体
 *
 * @author zzy
 * @version 1.0
 * @since 2019/7/22 11:16
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
public class HolidayCalendar extends AbstractBaseEntity {

    /**
     * 假日编号
     */
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "myid")
    @GenericGenerator(name = "myid", strategy = "com.jiayue.ipfcst.common.data.entity.id.CustomIDGenerator")
    @Id
    @Column
    private Integer id;

    /**
     * 假日名称
     */
    @Column
    private String name;

    /**
     * 假日开始时间
     */
    @Column
    private Long startTime;

    /**
     * 假日结束时间
     */
    @Column
    private Long endTime;

    /**
     * 假日天数
     */
    @Column
    private Integer days;

    /**
     * 假期类型
     */
    @Column
    @Enumerated(EnumType.STRING)
    private HolidayTypeEnum holidayTypeEnum;

    @Column
    private String stationCode;

}
