import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdPositionStyle } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-20 22:09
 */
interface AdPositionStyleCU extends ConditionUtil<AdPositionStyleCU>{
    AD_POSITION_ID:FieldUtil<AdPositionStyleCU>;
    AD_STYLE_ID:FieldUtil<AdPositionStyleCU>;
    DEL_FLAG:FieldUtil<AdPositionStyleCU>;
}

class AdPositionStyleCUImpl extends ConditionUtilImpl<AdPositionStyleCUImpl> implements AdPositionStyleCU{ 
    newInstance(): AdPositionStyleCUImpl {
        return new AdPositionStyleCUImpl();
    } 
    get AD_POSITION_ID(): FieldUtil<AdPositionStyleCU>{  
        return new FieldUtil('ad_position_id','adPositionId','广告位置表id', this);
    }
    get AD_STYLE_ID(): FieldUtil<AdPositionStyleCU>{  
        return new FieldUtil('ad_style_id','adStyleId','广告样式表id', this);
    }
    get DEL_FLAG(): FieldUtil<AdPositionStyleCU>{  
        return new FieldUtil('del_flag','delFlag','是否删除：0，否；1，是', this);
    }
}

@Singleton 
class AdPositionStyleMU extends TableUtilImpl<AdPositionStyleCU,AdPositionStyle>{ 
    tableName  = 'ad_position_style';
    tableFields  = ['ad_position_id','ad_style_id','del_flag'];
    modelFields  = ['adPositionId','adStyleId','delFlag'];
    modelIdFields  = ['adPositionId','adStyleId'];
    tableIdFields  = ['ad_position_id','ad_style_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdPositionStyleCU {
        return new AdPositionStyleCUImpl();
    }   

    static get AD_POSITION_ID(): FieldUtil<AdPositionStyleCU>{ 
        return new FieldUtil('ad_position_id','adPositionId','广告位置表id', new AdPositionStyleCUImpl());
    }
    static get AD_STYLE_ID(): FieldUtil<AdPositionStyleCU>{ 
        return new FieldUtil('ad_style_id','adStyleId','广告样式表id', new AdPositionStyleCUImpl());
    }
    static get DEL_FLAG(): FieldUtil<AdPositionStyleCU>{ 
        return new FieldUtil('del_flag','delFlag','是否删除：0，否；1，是', new AdPositionStyleCUImpl());
    }

    get AD_POSITION_ID(): FieldUtil<AdPositionStyleCU>{ 
        return AdPositionStyleMU.AD_POSITION_ID;
    }
    get AD_STYLE_ID(): FieldUtil<AdPositionStyleCU>{ 
        return AdPositionStyleMU.AD_STYLE_ID;
    }
    get DEL_FLAG(): FieldUtil<AdPositionStyleCU>{ 
        return AdPositionStyleMU.DEL_FLAG;
    }
}
export {AdPositionStyleMU, AdPositionStyleCU}
