package com.chushang.inspection.project.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chushang.common.core.validator.Create;
import com.chushang.common.core.validator.Update;
import com.chushang.common.mybatis.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
  * @auther: zhao
  * @date: 2024/6/18 15:39
  */
@Data
@EqualsAndHashCode(callSuper=true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "inspection_detail")
public class InspectionDetail extends BaseEntity {
    /**
     * 详情id
     */
    @TableId(value = "detail_id", type = IdType.ASSIGN_ID)
    @NotNull(message = "detail_id 不能为空", groups = {Update.class})
    private Long detailId;
    /**
     * 配置id
     */
    @TableField(value = "config_id")
    @NotNull(message = "config_id 不能为空", groups = {Create.class, Update.class})
    private Long configId;
    /**
     * 配置对应label
     */
    @TableField(value = "config_label")
    private String configLabel;

    /**
     * 配置对应key
     */
    @TableField(value = "config_key")
    @NotNull(message = "config_key 不能为空", groups = {Create.class, Update.class})
    private String configKey;
    /**
     * key 对应类型
     */
    @TableField(value = "config_type")
    @NotNull(message = "config_type 不能为空", groups = {Create.class, Update.class})
    private Short configType;
    /**
     * label 对应的结果值--此值为选项值, 非最终呈现值
     */
    @TableField(value = "result")
    private String result;
}
