package com.mortals.xhx.base.system.gentable.model;

import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.common.utils.StringUtils;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * Description:Gentable
 * date: 2021-9-29 9:35:30
 */
@Data
public class GentableEntityExt extends BaseEntityLong {

    /**
     * 主键信息
     */
    private GentableColumnEntity pkColumn;

    /**
     * 子表信息
     */
    private GentableEntity subTable;
    /**
     * 表列信息
     */
    private List<GentableColumnEntity> columns;

    public static boolean isSuperColumn(String javaField) {
        return StringUtils.equalsAnyIgnoreCase(javaField,
                // BaseEntity
                "id","createUser", "createTime", "updateUser",
                "updateTime","createUserId","updateUserId",
                // TreeEntity
                "parentName", "parentId", "orderNum", "ancestors");
    }



}