package cn.feast.coding.model.generator;

import cn.feast.coding.model.Common;

/**
 * Created By FeastCoding.
 */
public class Colunm extends Common {
    private Integer id;
    private String colunmName;
    private String pageColunmName;
    private String filedName;
    private String colunmType;
    private String showName;
    private Integer editStyle;
    private Integer isPrimary;
    private Integer isShowed;
    private Integer tableId;
    private Table table;

    public void frameAdapter(String frame){
        if(frame.equals(SSH_FRAME)){
            this.pageColunmName = classNameToFiledName(table.getClassName()) + "." + colunmName;
        }else{
            this.pageColunmName = colunmName;
        }
    }
    public String getPageColunmName() {
        return pageColunmName;
    }

    public void setPageColunmName(String pageColunmName) {
        this.pageColunmName = pageColunmName;
    }

    public Table getTable() {
        return table;
    }

    public void setTable(Table table) {
        this.table = table;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getColunmName() {
        return colunmName;
    }

    public void setColunmName(String colunmName) {
        this.colunmName = colunmName;
    }

    public String getFiledName() {
        return filedName;
    }

    public void setFiledName(String filedName) {
        this.filedName = filedName;
    }

    public String getColunmType() {
        return colunmType;
    }

    public void setColunmType(String colunmType) {
        this.colunmType = colunmType;
    }

    public String getShowName() {
        return showName;
    }

    public void setShowName(String showName) {
        this.showName = showName;
    }

    public Integer getEditStyle() {
        return editStyle;
    }

    public void setEditStyle(Integer editStyle) {
        this.editStyle = editStyle;
    }

    public Integer getIsPrimary() {
        return isPrimary;
    }

    public void setIsPrimary(Integer isPrimary) {
        this.isPrimary = isPrimary;
    }

    public Integer getIsShowed() {
        return isShowed;
    }

    public void setIsShowed(Integer isShowed) {
        this.isShowed = isShowed;
    }

    public Integer getTableId() {
        return tableId;
    }

    public void setTableId(Integer tableId) {
        this.tableId = tableId;
    }

}
