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

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.core.annotation.Order;

import javax.persistence.*;
import javax.validation.constraints.Digits;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 设备数据
 *
 * @author zzy
 * @version 1.0
 * @since 2019/8/19 14:28
 */

@Data
@MappedSuperclass
public class AbstractEquipmentStatusData implements Serializable {

    private static final long serialVersionUID = 1L;


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

    /**
     * 设备编号
     */
    @Column
    private Integer equipmentNo;

    /**
     * 状态
     * 状态值为0代表运行，1代表故障，2代表待机，3代表检修
     */
    @Column
    private Integer status = 0;


    /**
     * 时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column
    private Date time;


    /**
     * 备用字段1
     */
    @Order(200)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data1 = new BigDecimal(-99);

    /**
     * 备用字段2
     */
    @Order(201)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data2 = new BigDecimal(-99);

    /**
     * 备用字段3
     */
    @Order(202)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data3 = new BigDecimal(-99);

    /**
     * 备用字段4
     */
    @Order(203)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data4 = new BigDecimal(-99);

    /**
     * 备用字段5
     */
    @Order(204)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data5 = new BigDecimal(-99);

    /**
     * 备用字段6
     */
    @Order(205)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data6 = new BigDecimal(-99);

    /**
     * 备用字段7
     */
    @Order(206)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data7 = new BigDecimal(-99);

    /**
     * 备用字段8
     */
    @Order(207)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data8 = new BigDecimal(-99);


    /**
     * 备用字段9
     */
    @Order(208)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data9 = new BigDecimal(-99);

    /**
     * 备用字段10
     */
    @Order(209)
    @Digits(integer = 5, fraction = 2)
    @Column
    private BigDecimal data10 = new BigDecimal(-99);


}
