package com.jeequan.jeepay.db.entity;

import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data;

import java.util.List;

@Data
@TableName(value = "t_qualification_define", autoResultMap = true)
public class QualificationDefineEntity {

    public static final String API_CODE_FIRST= "API_";
    public static final String API_CODE_LAST= "_ZZMB";

    @TableId
    private String code;

    @TableField(condition = SqlCondition.LIKE)
    private String name;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<Item> params;

    @Data
    public static class Item {
        private String name;

        private String inputType;

        private String propertyName;

        private List<String> optionList;
    }
}
