import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { LanguageText } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-10-16 11:27
 */
interface LanguageTextCU extends ConditionUtil<LanguageTextCU>{
    ID:FieldUtil<LanguageTextCU>;
    TEXT_CODE:FieldUtil<LanguageTextCU>;
    LANGUAGE_CODE:FieldUtil<LanguageTextCU>;
    TEXT_VALUE:FieldUtil<LanguageTextCU>;
    REMARK:FieldUtil<LanguageTextCU>;
    STATE:FieldUtil<LanguageTextCU>;
}

class LanguageTextCUImpl extends ConditionUtilImpl<LanguageTextCUImpl> implements LanguageTextCU{ 
    newInstance(): LanguageTextCUImpl {
        return new LanguageTextCUImpl();
    } 
    get ID(): FieldUtil<LanguageTextCU>{  
        return new FieldUtil('ID','id','', this);
    }
    get TEXT_CODE(): FieldUtil<LanguageTextCU>{  
        return new FieldUtil('TEXT_CODE','textCode','文本代码：同一个文本多种语言共用一个', this);
    }
    get LANGUAGE_CODE(): FieldUtil<LanguageTextCU>{  
        return new FieldUtil('LANGUAGE_CODE','languageCode','语言代码：
http://www.lingoes.cn/zh/translator/langcode', this);
    }
    get TEXT_VALUE(): FieldUtil<LanguageTextCU>{  
        return new FieldUtil('TEXT_VALUE','textValue','文本内容', this);
    }
    get REMARK(): FieldUtil<LanguageTextCU>{  
        return new FieldUtil('REMARK','remark','备注', this);
    }
    get STATE(): FieldUtil<LanguageTextCU>{  
        return new FieldUtil('STATE','state','0-正常，1-删除', this);
    }
}

@Singleton 
class LanguageTextMU extends TableUtilImpl<LanguageTextCU,LanguageText>{ 
    tableName  = 'language_text';
    tableFields  = ['id','text_code','language_code','text_value','remark','state'];
    modelFields  = ['id','textCode','languageCode','textValue','remark','state'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): LanguageTextCU {
        return new LanguageTextCUImpl();
    }   

    static get ID(): FieldUtil<LanguageTextCU>{ 
        return new FieldUtil('ID','id','', new LanguageTextCUImpl());
    }
    static get TEXT_CODE(): FieldUtil<LanguageTextCU>{ 
        return new FieldUtil('TEXT_CODE','textCode','文本代码：同一个文本多种语言共用一个', new LanguageTextCUImpl());
    }
    static get LANGUAGE_CODE(): FieldUtil<LanguageTextCU>{ 
        return new FieldUtil('LANGUAGE_CODE','languageCode','语言代码：
http://www.lingoes.cn/zh/translator/langcode', new LanguageTextCUImpl());
    }
    static get TEXT_VALUE(): FieldUtil<LanguageTextCU>{ 
        return new FieldUtil('TEXT_VALUE','textValue','文本内容', new LanguageTextCUImpl());
    }
    static get REMARK(): FieldUtil<LanguageTextCU>{ 
        return new FieldUtil('REMARK','remark','备注', new LanguageTextCUImpl());
    }
    static get STATE(): FieldUtil<LanguageTextCU>{ 
        return new FieldUtil('STATE','state','0-正常，1-删除', new LanguageTextCUImpl());
    }

    get ID(): FieldUtil<LanguageTextCU>{ 
        return LanguageTextMU.ID;
    }
    get TEXT_CODE(): FieldUtil<LanguageTextCU>{ 
        return LanguageTextMU.TEXT_CODE;
    }
    get LANGUAGE_CODE(): FieldUtil<LanguageTextCU>{ 
        return LanguageTextMU.LANGUAGE_CODE;
    }
    get TEXT_VALUE(): FieldUtil<LanguageTextCU>{ 
        return LanguageTextMU.TEXT_VALUE;
    }
    get REMARK(): FieldUtil<LanguageTextCU>{ 
        return LanguageTextMU.REMARK;
    }
    get STATE(): FieldUtil<LanguageTextCU>{ 
        return LanguageTextMU.STATE;
    }
}
export {LanguageTextMU, LanguageTextCU}
