package com.goer.project.model.modelEntity.domain;

import com.goer.project.model.modelField.domain.ModelField;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.goer.framework.aspectj.lang.annotation.Excel;
import com.goer.framework.web.domain.BaseEntity;

import java.util.List;

/**
 * 数据对象 t_model_entity
 * 
 * @author goer
 * @date 2022-01-17
 */
public class ModelEntity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;
    private Long parentEntityId;

    /** 模型对象ID */
    @Excel(name = "模型对象ID")
    private Long projectId;

    /** 版本id */
    @Excel(name = "版本id")
    private Long versionId;

    /** 表名称 */
    @Excel(name = "表名称")
    private String entityName;

    /** 表逻辑名 */
    @Excel(name = "表逻辑名")
    private String entityCode;

    /** 基版本id */
    @Excel(name = "基版本id")
    private Long parentVersionId;

    /** 顺序 */
    @Excel(name = "顺序")
    private Integer entitySort;

    private List<ModelField> fields;

    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }

    public void setParentEntityId(Long parentEntityId)
    {
        this.parentEntityId = parentEntityId;
    }
    public Long getParentEntityId()
    {
        return parentEntityId;
    }

    public void setProjectId(Long projectId)
    {
        this.projectId = projectId;
    }
    public Long getProjectId()
    {
        return projectId;
    }

    public void setVersionId(Long versionId)
    {
        this.versionId = versionId;
    }
    public Long getVersionId()
    {
        return versionId;
    }

    public void setEntityName(String entityName)
    {
        this.entityName = entityName;
    }
    public String getEntityName()
    {
        return entityName;
    }

    public void setEntityCode(String entityCode)
    {
        this.entityCode = entityCode;
    }
    public String getEntityCode()
    {
        return entityCode;
    }

    public void setParentVersionId(Long parentVersionId)
    {
        this.parentVersionId = parentVersionId;
    }
    public Long getParentVersionId()
    {
        return parentVersionId;
    }

    public void setEntitySort(Integer entitySort)
    {
        this.entitySort = entitySort;
    }
    public Integer getEntitySort()
    {
        return entitySort;
    }

    public List<ModelField> getFields() {
        return fields;
    }
    public void setFields(List<ModelField> fields) {
        this.fields = fields;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("projectId", getProjectId())
            .append("versionId", getVersionId())
            .append("entityName", getEntityName())
            .append("entityCode", getEntityCode())
            .append("remark", getRemark())
            .append("parentVersionId", getParentVersionId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }

    public Long getOrgEntityId() {
        return orgEntityId;
    }

    public void setOrgEntityId(Long orgEntityId) {
        this.orgEntityId = orgEntityId;
    }

    private Long orgEntityId;


}
