import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdStyleMaterialType } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-23 16:06
 */
interface AdStyleMaterialTypeCU extends ConditionUtil<AdStyleMaterialTypeCU>{
    AD_STYLE_ID:FieldUtil<AdStyleMaterialTypeCU>;
    AD_MATERIAL_TYPE_CODE:FieldUtil<AdStyleMaterialTypeCU>;
    DEL_FLAG:FieldUtil<AdStyleMaterialTypeCU>;
}

class AdStyleMaterialTypeCUImpl extends ConditionUtilImpl<AdStyleMaterialTypeCUImpl> implements AdStyleMaterialTypeCU{ 
    newInstance(): AdStyleMaterialTypeCUImpl {
        return new AdStyleMaterialTypeCUImpl();
    } 
    get AD_STYLE_ID(): FieldUtil<AdStyleMaterialTypeCU>{  
        return new FieldUtil('ad_style_id','adStyleId','', this);
    }
    get AD_MATERIAL_TYPE_CODE(): FieldUtil<AdStyleMaterialTypeCU>{  
        return new FieldUtil('ad_material_type_code','adMaterialTypeCode','', this);
    }
    get DEL_FLAG(): FieldUtil<AdStyleMaterialTypeCU>{  
        return new FieldUtil('del_flag','delFlag','是否删除', this);
    }
}

@Singleton 
class AdStyleMaterialTypeMU extends TableUtilImpl<AdStyleMaterialTypeCU,AdStyleMaterialType>{ 
    tableName  = 'ad_style_material_type';
    tableFields  = ['ad_style_id','ad_material_type_code','del_flag'];
    modelFields  = ['adStyleId','adMaterialTypeCode','delFlag'];
    modelIdFields  = ['adStyleId'];
    tableIdFields  = ['ad_style_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdStyleMaterialTypeCU {
        return new AdStyleMaterialTypeCUImpl();
    }   

    static get AD_STYLE_ID(): FieldUtil<AdStyleMaterialTypeCU>{ 
        return new FieldUtil('ad_style_id','adStyleId','', new AdStyleMaterialTypeCUImpl());
    }
    static get AD_MATERIAL_TYPE_CODE(): FieldUtil<AdStyleMaterialTypeCU>{ 
        return new FieldUtil('ad_material_type_code','adMaterialTypeCode','', new AdStyleMaterialTypeCUImpl());
    }
    static get DEL_FLAG(): FieldUtil<AdStyleMaterialTypeCU>{ 
        return new FieldUtil('del_flag','delFlag','是否删除', new AdStyleMaterialTypeCUImpl());
    }

    get AD_STYLE_ID(): FieldUtil<AdStyleMaterialTypeCU>{ 
        return AdStyleMaterialTypeMU.AD_STYLE_ID;
    }
    get AD_MATERIAL_TYPE_CODE(): FieldUtil<AdStyleMaterialTypeCU>{ 
        return AdStyleMaterialTypeMU.AD_MATERIAL_TYPE_CODE;
    }
    get DEL_FLAG(): FieldUtil<AdStyleMaterialTypeCU>{ 
        return AdStyleMaterialTypeMU.DEL_FLAG;
    }
}
export {AdStyleMaterialTypeMU, AdStyleMaterialTypeCU}
