import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { PpUnicomUserLog } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-22 15:11
 */
interface PpUnicomUserLogCU extends ConditionUtil<PpUnicomUserLogCU>{
    USER_ID:FieldUtil<PpUnicomUserLogCU>;
    USE_SCORE:FieldUtil<PpUnicomUserLogCU>;
    USE_TIME:FieldUtil<PpUnicomUserLogCU>;
}

class PpUnicomUserLogCUImpl extends ConditionUtilImpl<PpUnicomUserLogCUImpl> implements PpUnicomUserLogCU{ 
    newInstance(): PpUnicomUserLogCUImpl {
        return new PpUnicomUserLogCUImpl();
    } 
    get USER_ID(): FieldUtil<PpUnicomUserLogCU>{  
        return new FieldUtil('USER_ID','userId','', this);
    }
    get USE_SCORE(): FieldUtil<PpUnicomUserLogCU>{  
        return new FieldUtil('USE_SCORE','useScore','抵扣积分', this);
    }
    get USE_TIME(): FieldUtil<PpUnicomUserLogCU>{  
        return new FieldUtil('USE_TIME','useTime','积分抵扣时间', this);
    }
}

@Singleton 
class PpUnicomUserLogMU extends TableUtilImpl<PpUnicomUserLogCU,PpUnicomUserLog>{ 
    tableName  = 'pp_unicom_user_log';
    tableFields  = ['USER_ID','USE_SCORE','USE_TIME'];
    modelFields  = ['userId','useScore','useTime'];
    modelIdFields  = ['userId'];
    tableIdFields  = ['USER_ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): PpUnicomUserLogCU {
        return new PpUnicomUserLogCUImpl();
    }   

    static get USER_ID(): FieldUtil<PpUnicomUserLogCU>{ 
        return new FieldUtil('USER_ID','userId','', new PpUnicomUserLogCUImpl());
    }
    static get USE_SCORE(): FieldUtil<PpUnicomUserLogCU>{ 
        return new FieldUtil('USE_SCORE','useScore','抵扣积分', new PpUnicomUserLogCUImpl());
    }
    static get USE_TIME(): FieldUtil<PpUnicomUserLogCU>{ 
        return new FieldUtil('USE_TIME','useTime','积分抵扣时间', new PpUnicomUserLogCUImpl());
    }

    get USER_ID(): FieldUtil<PpUnicomUserLogCU>{ 
        return PpUnicomUserLogMU.USER_ID;
    }
    get USE_SCORE(): FieldUtil<PpUnicomUserLogCU>{ 
        return PpUnicomUserLogMU.USE_SCORE;
    }
    get USE_TIME(): FieldUtil<PpUnicomUserLogCU>{ 
        return PpUnicomUserLogMU.USE_TIME;
    }
}
export {PpUnicomUserLogMU, PpUnicomUserLogCU}
