package net.vtstar.zhongtong.avi.gateway.painting.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.vtstar.scada.base.gather.domain.EquipmentData;
import net.vtstar.user.search.JoinColumn;
import net.vtstar.user.search.Search;
import net.vtstar.zhongtong.avi.equipment.domain.EquipInfo;
import net.vtstar.zhongtong.avi.global.web.Show;
import net.vtstar.zhongtong.avi.global.web.domain.enums.FieldType;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Search(code = "POLISHING_ROOM")
@ApiModel("涂装-打磨室风机运行时间")
@Table(name = "machine_runtime_record")
public class PolishingRoomMachine{

    @Id
    private Long id;

    @ApiModelProperty(notes = "设备ID")
    @Column(name = "machine_id")
    private Long machineId;

    @Show(label = "设备名称")
    @ApiModelProperty(notes = "设备名称")
    @JoinColumn(tableName = EquipInfo.class, name = "equip_code")
    private String equipCode;

    @Show(label = "设备编号")
    @ApiModelProperty(notes = "设备编号")
    @JoinColumn(tableName = EquipInfo.class, name = "alias")
    @Search
    private String alias;

    @Show(label = "当班运行时间(h)")
    @ApiModelProperty(notes = "当前运行时间")
    @Column(name = "current_runtime")
    private BigDecimal currentRuntime;


    @Show(label = "更新时间", dataType = FieldType.DATETIME)
    @ApiModelProperty(notes = "创建时间")
    @Column(name = "create_time")
    private Date createTime;

}
