import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CnLabel } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-06-11 14:39
 */
interface CnLabelCU extends ConditionUtil<CnLabelCU>{
    ID:FieldUtil<CnLabelCU>;
    NAME:FieldUtil<CnLabelCU>;
    DESCRIBE:FieldUtil<CnLabelCU>;
    DELETED:FieldUtil<CnLabelCU>;
    CREATE_USER_ID:FieldUtil<CnLabelCU>;
    CREATE_TIME:FieldUtil<CnLabelCU>;
    UPDATE_USER_ID:FieldUtil<CnLabelCU>;
    UPDATE_TIME:FieldUtil<CnLabelCU>;
}

class CnLabelCUImpl extends ConditionUtilImpl<CnLabelCUImpl> implements CnLabelCU{ 
    newInstance(): CnLabelCUImpl {
        return new CnLabelCUImpl();
    } 
    get ID(): FieldUtil<CnLabelCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get NAME(): FieldUtil<CnLabelCU>{  
        return new FieldUtil('name','name','名称', this);
    }
    get DESCRIBE(): FieldUtil<CnLabelCU>{  
        return new FieldUtil('describe','describe','描述', this);
    }
    get DELETED(): FieldUtil<CnLabelCU>{  
        return new FieldUtil('deleted','deleted','删除标记', this);
    }
    get CREATE_USER_ID(): FieldUtil<CnLabelCU>{  
        return new FieldUtil('create_user_id','createUserId','创建人', this);
    }
    get CREATE_TIME(): FieldUtil<CnLabelCU>{  
        return new FieldUtil('create_time','createTime','创建时间', this);
    }
    get UPDATE_USER_ID(): FieldUtil<CnLabelCU>{  
        return new FieldUtil('update_user_id','updateUserId','更新人', this);
    }
    get UPDATE_TIME(): FieldUtil<CnLabelCU>{  
        return new FieldUtil('update_time','updateTime','更新时间', this);
    }
}

@Singleton 
class CnLabelMU extends TableUtilImpl<CnLabelCU,CnLabel>{ 
    tableName  = 'cn_label';
    tableFields  = ['id','name','describe','deleted','create_user_id','create_time','update_user_id','update_time'];
    modelFields  = ['id','name','describe','deleted','createUserId','createTime','updateUserId','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CnLabelCU {
        return new CnLabelCUImpl();
    }   

    static get ID(): FieldUtil<CnLabelCU>{ 
        return new FieldUtil('id','id','主键', new CnLabelCUImpl());
    }
    static get NAME(): FieldUtil<CnLabelCU>{ 
        return new FieldUtil('name','name','名称', new CnLabelCUImpl());
    }
    static get DESCRIBE(): FieldUtil<CnLabelCU>{ 
        return new FieldUtil('describe','describe','描述', new CnLabelCUImpl());
    }
    static get DELETED(): FieldUtil<CnLabelCU>{ 
        return new FieldUtil('deleted','deleted','删除标记', new CnLabelCUImpl());
    }
    static get CREATE_USER_ID(): FieldUtil<CnLabelCU>{ 
        return new FieldUtil('create_user_id','createUserId','创建人', new CnLabelCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CnLabelCU>{ 
        return new FieldUtil('create_time','createTime','创建时间', new CnLabelCUImpl());
    }
    static get UPDATE_USER_ID(): FieldUtil<CnLabelCU>{ 
        return new FieldUtil('update_user_id','updateUserId','更新人', new CnLabelCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<CnLabelCU>{ 
        return new FieldUtil('update_time','updateTime','更新时间', new CnLabelCUImpl());
    }

    get ID(): FieldUtil<CnLabelCU>{ 
        return CnLabelMU.ID;
    }
    get NAME(): FieldUtil<CnLabelCU>{ 
        return CnLabelMU.NAME;
    }
    get DESCRIBE(): FieldUtil<CnLabelCU>{ 
        return CnLabelMU.DESCRIBE;
    }
    get DELETED(): FieldUtil<CnLabelCU>{ 
        return CnLabelMU.DELETED;
    }
    get CREATE_USER_ID(): FieldUtil<CnLabelCU>{ 
        return CnLabelMU.CREATE_USER_ID;
    }
    get CREATE_TIME(): FieldUtil<CnLabelCU>{ 
        return CnLabelMU.CREATE_TIME;
    }
    get UPDATE_USER_ID(): FieldUtil<CnLabelCU>{ 
        return CnLabelMU.UPDATE_USER_ID;
    }
    get UPDATE_TIME(): FieldUtil<CnLabelCU>{ 
        return CnLabelMU.UPDATE_TIME;
    }
}
export {CnLabelMU, CnLabelCU}
