package com.izouma.jmrh.domain.stat;

import com.izouma.jmrh.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("模块预警阀值")
public class Threshold extends BaseEntity {
    @ApiModelProperty("最大阀值")
    private long maxValue;

    @ApiModelProperty("最小阀值")
    private long minValue;

    @ApiModelProperty("增长阀值")
    private long increaseValue;

    @ApiModelProperty("下降阀值")
    private long decreaseValue;

    @ApiModelProperty("模块")
    private Long categoryId;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "categoryId", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
    private Category category;
}
