package com.purui.prims.headless.api.pojo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Identify {

    @ApiModelProperty(value = "主键名称")
    private String name;
    /**
     * primary, foreign
     */
    @ApiModelProperty(value = "主键类型")
    private String type;

    @ApiModelProperty(value = "业务名称")
    private String bizName;

    @ApiModelProperty(hidden = true)
    private List<String> entityNames;

    @ApiModelProperty(value = "是否创建维度")
    private Integer isCreateDimension = 0;

    public Identify(String name, String type, String bizName) {
        this.name = name;
        this.type = type;
        this.bizName = bizName;
    }

    public Identify(String name, String type, String bizName, Integer isCreateDimension) {
        this.name = name;
        this.type = type;
        this.bizName = bizName;
        this.isCreateDimension = isCreateDimension;
    }

    public String getFieldName() {
        return name;
    }

}
