import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { ContentConfig } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-11-06 11:37
 */
interface ContentConfigCU extends ConditionUtil<ContentConfigCU>{
    ID:FieldUtil<ContentConfigCU>;
    CONTENT:FieldUtil<ContentConfigCU>;
    CREATE_USER:FieldUtil<ContentConfigCU>;
    UPDATE_USER:FieldUtil<ContentConfigCU>;
    CREATE_TIME:FieldUtil<ContentConfigCU>;
    UPDATE_TIME:FieldUtil<ContentConfigCU>;
}

class ContentConfigCUImpl extends ConditionUtilImpl<ContentConfigCUImpl> implements ContentConfigCU{ 
    newInstance(): ContentConfigCUImpl {
        return new ContentConfigCUImpl();
    } 
    get ID(): FieldUtil<ContentConfigCU>{  
        return new FieldUtil('ID','id','标识', this);
    }
    get CONTENT(): FieldUtil<ContentConfigCU>{  
        return new FieldUtil('CONTENT','content','问卷内容', this);
    }
    get CREATE_USER(): FieldUtil<ContentConfigCU>{  
        return new FieldUtil('CREATE_USER','createUser','', this);
    }
    get UPDATE_USER(): FieldUtil<ContentConfigCU>{  
        return new FieldUtil('UPDATE_USER','updateUser','更新人', this);
    }
    get CREATE_TIME(): FieldUtil<ContentConfigCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
    get UPDATE_TIME(): FieldUtil<ContentConfigCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','', this);
    }
}

@Singleton 
class ContentConfigMU extends TableUtilImpl<ContentConfigCU,ContentConfig>{ 
    tableName  = 'cq_content_config';
    tableFields  = ['id','content','create_user','update_user','create_time','update_time'];
    modelFields  = ['id','content','createUser','updateUser','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): ContentConfigCU {
        return new ContentConfigCUImpl();
    }   

    static get ID(): FieldUtil<ContentConfigCU>{ 
        return new FieldUtil('ID','id','标识', new ContentConfigCUImpl());
    }
    static get CONTENT(): FieldUtil<ContentConfigCU>{ 
        return new FieldUtil('CONTENT','content','问卷内容', new ContentConfigCUImpl());
    }
    static get CREATE_USER(): FieldUtil<ContentConfigCU>{ 
        return new FieldUtil('CREATE_USER','createUser','', new ContentConfigCUImpl());
    }
    static get UPDATE_USER(): FieldUtil<ContentConfigCU>{ 
        return new FieldUtil('UPDATE_USER','updateUser','更新人', new ContentConfigCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<ContentConfigCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new ContentConfigCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<ContentConfigCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','', new ContentConfigCUImpl());
    }

    get ID(): FieldUtil<ContentConfigCU>{ 
        return ContentConfigMU.ID;
    }
    get CONTENT(): FieldUtil<ContentConfigCU>{ 
        return ContentConfigMU.CONTENT;
    }
    get CREATE_USER(): FieldUtil<ContentConfigCU>{ 
        return ContentConfigMU.CREATE_USER;
    }
    get UPDATE_USER(): FieldUtil<ContentConfigCU>{ 
        return ContentConfigMU.UPDATE_USER;
    }
    get CREATE_TIME(): FieldUtil<ContentConfigCU>{ 
        return ContentConfigMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<ContentConfigCU>{ 
        return ContentConfigMU.UPDATE_TIME;
    }
}
export {ContentConfigMU, ContentConfigCU}
