import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { Ad_meterial_detail } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-19 14:33
 */
interface Ad_meterial_detailCU extends ConditionUtil<Ad_meterial_detailCU>{
    ID:FieldUtil<Ad_meterial_detailCU>;
    AD_MATERIAL_ID:FieldUtil<Ad_meterial_detailCU>;
    TYPE:FieldUtil<Ad_meterial_detailCU>;
    VALUE:FieldUtil<Ad_meterial_detailCU>;
    STATUS:FieldUtil<Ad_meterial_detailCU>;
    CREATE_TIME:FieldUtil<Ad_meterial_detailCU>;
    CREATOR:FieldUtil<Ad_meterial_detailCU>;
    UPDATE_TIME:FieldUtil<Ad_meterial_detailCU>;
    UPDATOR:FieldUtil<Ad_meterial_detailCU>;
}

class Ad_meterial_detailCUImpl extends ConditionUtilImpl<Ad_meterial_detailCUImpl> implements Ad_meterial_detailCU{ 
    newInstance(): Ad_meterial_detailCUImpl {
        return new Ad_meterial_detailCUImpl();
    } 
    get ID(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('ID','id','素材明细id', this);
    }
    get AD_MATERIAL_ID(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('AD_MATERIAL_ID','adMaterialId','素材id', this);
    }
    get TYPE(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('TYPE','type','素材类型：0，图片；1，主标题；2，副标题', this);
    }
    get VALUE(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('VALUE','value','素材内容', this);
    }
    get STATUS(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('STATUS','status','状态：0，启用；1，删除', this);
    }
    get CREATE_TIME(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
    get CREATOR(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('CREATOR','creator','', this);
    }
    get UPDATE_TIME(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','', this);
    }
    get UPDATOR(): FieldUtil<Ad_meterial_detailCU>{  
        return new FieldUtil('UPDATOR','updator','', this);
    }
}

@Singleton 
class Ad_meterial_detailMU extends TableUtilImpl<Ad_meterial_detailCU,Ad_meterial_detail>{ 
    tableName  = 'ad_meterial_detail';
    tableFields  = ['id','ad_material_id','type','value','status','create_time','creator','update_time','updator'];
    modelFields  = ['id','adMaterialId','type','value','status','createTime','creator','updateTime','updator'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): Ad_meterial_detailCU {
        return new Ad_meterial_detailCUImpl();
    }   

    static get ID(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('ID','id','素材明细id', new Ad_meterial_detailCUImpl());
    }
    static get AD_MATERIAL_ID(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('AD_MATERIAL_ID','adMaterialId','素材id', new Ad_meterial_detailCUImpl());
    }
    static get TYPE(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('TYPE','type','素材类型：0，图片；1，主标题；2，副标题', new Ad_meterial_detailCUImpl());
    }
    static get VALUE(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('VALUE','value','素材内容', new Ad_meterial_detailCUImpl());
    }
    static get STATUS(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('STATUS','status','状态：0，启用；1，删除', new Ad_meterial_detailCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new Ad_meterial_detailCUImpl());
    }
    static get CREATOR(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('CREATOR','creator','', new Ad_meterial_detailCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','', new Ad_meterial_detailCUImpl());
    }
    static get UPDATOR(): FieldUtil<Ad_meterial_detailCU>{ 
        return new FieldUtil('UPDATOR','updator','', new Ad_meterial_detailCUImpl());
    }

    get ID(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.ID;
    }
    get AD_MATERIAL_ID(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.AD_MATERIAL_ID;
    }
    get TYPE(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.TYPE;
    }
    get VALUE(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.VALUE;
    }
    get STATUS(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.STATUS;
    }
    get CREATE_TIME(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.CREATE_TIME;
    }
    get CREATOR(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.CREATOR;
    }
    get UPDATE_TIME(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.UPDATE_TIME;
    }
    get UPDATOR(): FieldUtil<Ad_meterial_detailCU>{ 
        return Ad_meterial_detailMU.UPDATOR;
    }
}
export {Ad_meterial_detailMU, Ad_meterial_detailCU}
