package com.jiayue.ipfcst.common.data.abst.equipmentinfo;

import com.jiayue.ipfcst.common.data.abst.AbstractBaseEntity;
import com.jiayue.ipfcst.common.data.constant.enums.EquipmentTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.core.annotation.Order;

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

/**
 * 设备
 *
 * @author zzy
 * @version 1.0
 * @since 2019/8/19 14:21
 */
@EqualsAndHashCode(callSuper = true)
@Data
@MappedSuperclass
public class AbstractEquipmentInfo extends AbstractBaseEntity {

    @Id
    @Order(1)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "myid")
    @GenericGenerator(name = "myid", strategy = "com.jiayue.ipfcst.common.data.entity.id.CustomIDGenerator")
    private Integer id;


    /**
     * 设备类型
     */
    @ApiModelProperty("设备类型")
    protected EquipmentTypeEnum equipmentType;

    /**
     * 名称
     */
    @Column
    @ApiModelProperty("名称11")
    private String name;

    /**
     * 制造商
     */
    private String manufacturer;

    /**
     * 型号
     */
    private String modelNumber;

    /**
     * 安装时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    private Date installationTime;

    /**
     * 是否上报
     */
    private Boolean report;

    /**
     * 场站编号（运维标识）
     */
    @Column
    private String stationCode;

    /**
     * 入库时间间隔  单位 s
     */
    @Column
    private Integer interval;


}
