package com.izouma.jmrh.domain;

import com.alibaba.fastjson.JSONObject;
import com.izouma.jmrh.converter.JSONObjectConverter;
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.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("指标")
public class Metric extends BaseEntity {

    @ApiModelProperty("一级指标")
    private String levelOne;

    @ApiModelProperty("二级指标")
    private String levelTwo;

    @ApiModelProperty("三级指标")
    private String levelThree;

    @ApiModelProperty("单位")
    private String unit;

    @ApiModelProperty("数据来源")
    private String source;

    @ApiModelProperty("计算方法")
    private String calcMethod;

    @ApiModelProperty("指标说明")
    private String remark;

    @ApiModelProperty("计算公式")
    private String formula;

    @Column(columnDefinition = "TEXT")
    @Convert(converter = JSONObjectConverter.class)
    private JSONObject extend;
}
