import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { PpUnicomCqUserLog } from '../models/index' 
/**
 * @author auto generate
 * @version 1.3
 * @date 2022-07-28 13:34
 */
interface PpUnicomCqUserLogCU extends ConditionUtil<PpUnicomCqUserLogCU>{
    ID:FieldUtil<PpUnicomCqUserLogCU>;
    USER_ID:FieldUtil<PpUnicomCqUserLogCU>;
    USE_ZVALUE:FieldUtil<PpUnicomCqUserLogCU>;
    USE_TIME:FieldUtil<PpUnicomCqUserLogCU>;
    PHONE:FieldUtil<PpUnicomCqUserLogCU>;
    ORDER_ID:FieldUtil<PpUnicomCqUserLogCU>;
    CONSUME_STATE:FieldUtil<PpUnicomCqUserLogCU>;
}

class PpUnicomCqUserLogCUImpl extends ConditionUtilImpl<PpUnicomCqUserLogCUImpl> implements PpUnicomCqUserLogCU{ 
    newInstance(): PpUnicomCqUserLogCUImpl {
        return new PpUnicomCqUserLogCUImpl();
    } 
    get ID(): FieldUtil<PpUnicomCqUserLogCU>{  
        return new FieldUtil('ID','id','ID', this);
    }
    get USER_ID(): FieldUtil<PpUnicomCqUserLogCU>{  
        return new FieldUtil('USER_ID','userId','用户ID', this);
    }
    get USE_ZVALUE(): FieldUtil<PpUnicomCqUserLogCU>{  
        return new FieldUtil('USE_ZVALUE','useZvalue','抵扣Z值', this);
    }
    get USE_TIME(): FieldUtil<PpUnicomCqUserLogCU>{  
        return new FieldUtil('USE_TIME','useTime','抵扣时间', this);
    }
    get PHONE(): FieldUtil<PpUnicomCqUserLogCU>{  
        return new FieldUtil('PHONE','phone','手机号', this);
    }
    get ORDER_ID(): FieldUtil<PpUnicomCqUserLogCU>{  
        return new FieldUtil('ORDER_ID','orderId','待定', this);
    }
    get CONSUME_STATE(): FieldUtil<PpUnicomCqUserLogCU>{  
        return new FieldUtil('CONSUME_STATE','consumeState','积分抵扣状态：00 成功；10 超时； 01超时后成功；02 超时后失败', this);
    }
}

@Singleton 
class PpUnicomCqUserLogMU extends TableUtilImpl<PpUnicomCqUserLogCU,PpUnicomCqUserLog>{ 
    tableName  = 'pp_unicom_cq_user_log';
    tableFields  = ['ID','USER_ID','USE_ZVALUE','USE_TIME','PHONE','ORDER_ID','CONSUME_STATE'];
    modelFields  = ['id','userId','useZvalue','useTime','phone','orderId','consumeState'];
    modelIdFields  = ['id'];
    tableIdFields  = ['ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): PpUnicomCqUserLogCU {
        return new PpUnicomCqUserLogCUImpl();
    }   

    static get ID(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return new FieldUtil('ID','id','ID', new PpUnicomCqUserLogCUImpl());
    }
    static get USER_ID(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return new FieldUtil('USER_ID','userId','用户ID', new PpUnicomCqUserLogCUImpl());
    }
    static get USE_ZVALUE(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return new FieldUtil('USE_ZVALUE','useZvalue','抵扣Z值', new PpUnicomCqUserLogCUImpl());
    }
    static get USE_TIME(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return new FieldUtil('USE_TIME','useTime','抵扣时间', new PpUnicomCqUserLogCUImpl());
    }
    static get PHONE(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return new FieldUtil('PHONE','phone','手机号', new PpUnicomCqUserLogCUImpl());
    }
    static get ORDER_ID(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return new FieldUtil('ORDER_ID','orderId','待定', new PpUnicomCqUserLogCUImpl());
    }
    static get CONSUME_STATE(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return new FieldUtil('CONSUME_STATE','consumeState','积分抵扣状态：00 成功；10 超时； 01超时后成功；02 超时后失败', new PpUnicomCqUserLogCUImpl());
    }

    get ID(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return PpUnicomCqUserLogMU.ID;
    }
    get USER_ID(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return PpUnicomCqUserLogMU.USER_ID;
    }
    get USE_ZVALUE(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return PpUnicomCqUserLogMU.USE_ZVALUE;
    }
    get USE_TIME(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return PpUnicomCqUserLogMU.USE_TIME;
    }
    get PHONE(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return PpUnicomCqUserLogMU.PHONE;
    }
    get ORDER_ID(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return PpUnicomCqUserLogMU.ORDER_ID;
    }
    get CONSUME_STATE(): FieldUtil<PpUnicomCqUserLogCU>{ 
        return PpUnicomCqUserLogMU.CONSUME_STATE;
    }
}
export {PpUnicomCqUserLogMU, PpUnicomCqUserLogCU}
