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

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

@Singleton 
class AdMaterialDetailMU extends TableUtilImpl<AdMaterialDetailCU,AdMaterialDetail>{ 
    tableName  = 'ad_material_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(): AdMaterialDetailCU {
        return new AdMaterialDetailCUImpl();
    }   

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

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