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

class PpTelecomUserLogCUImpl extends ConditionUtilImpl<PpTelecomUserLogCUImpl> implements PpTelecomUserLogCU{ 
    newInstance(): PpTelecomUserLogCUImpl {
        return new PpTelecomUserLogCUImpl();
    } 
    get ID(): FieldUtil<PpTelecomUserLogCU>{  
        return new FieldUtil('ID','id','ID', this);
    }
    get USER_ID(): FieldUtil<PpTelecomUserLogCU>{  
        return new FieldUtil('USER_ID','userId','用户ID', this);
    }
    get ORDER_ID(): FieldUtil<PpTelecomUserLogCU>{  
        return new FieldUtil('ORDER_ID','orderId','来源的订单ID', this);
    }
    get USE_TIME(): FieldUtil<PpTelecomUserLogCU>{  
        return new FieldUtil('USE_TIME','useTime','发货时间', this);
    }
    get PHONE(): FieldUtil<PpTelecomUserLogCU>{  
        return new FieldUtil('PHONE','phone','手机号', this);
    }
    get STATE(): FieldUtil<PpTelecomUserLogCU>{  
        return new FieldUtil('STATE','state','状态：00 发券成功；01 发券失败；02 查无userId 不发券；03 未传手机号 不发券', this);
    }
}

@Singleton 
class PpTelecomUserLogMU extends TableUtilImpl<PpTelecomUserLogCU,PpTelecomUserLog>{ 
    tableName  = 'pp_telecom_user_log';
    tableFields  = ['ID','USER_ID','ORDER_ID','USE_TIME','PHONE','STATE'];
    modelFields  = ['id','userId','orderId','useTime','phone','state'];
    modelIdFields  = ['id'];
    tableIdFields  = ['ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): PpTelecomUserLogCU {
        return new PpTelecomUserLogCUImpl();
    }   

    static get ID(): FieldUtil<PpTelecomUserLogCU>{ 
        return new FieldUtil('ID','id','ID', new PpTelecomUserLogCUImpl());
    }
    static get USER_ID(): FieldUtil<PpTelecomUserLogCU>{ 
        return new FieldUtil('USER_ID','userId','用户ID', new PpTelecomUserLogCUImpl());
    }
    static get ORDER_ID(): FieldUtil<PpTelecomUserLogCU>{ 
        return new FieldUtil('ORDER_ID','orderId','来源的订单ID', new PpTelecomUserLogCUImpl());
    }
    static get USE_TIME(): FieldUtil<PpTelecomUserLogCU>{ 
        return new FieldUtil('USE_TIME','useTime','发货时间', new PpTelecomUserLogCUImpl());
    }
    static get PHONE(): FieldUtil<PpTelecomUserLogCU>{ 
        return new FieldUtil('PHONE','phone','手机号', new PpTelecomUserLogCUImpl());
    }
    static get STATE(): FieldUtil<PpTelecomUserLogCU>{ 
        return new FieldUtil('STATE','state','状态：00 发券成功；01 发券失败；02 查无userId 不发券；03 未传手机号 不发券', new PpTelecomUserLogCUImpl());
    }

    get ID(): FieldUtil<PpTelecomUserLogCU>{ 
        return PpTelecomUserLogMU.ID;
    }
    get USER_ID(): FieldUtil<PpTelecomUserLogCU>{ 
        return PpTelecomUserLogMU.USER_ID;
    }
    get ORDER_ID(): FieldUtil<PpTelecomUserLogCU>{ 
        return PpTelecomUserLogMU.ORDER_ID;
    }
    get USE_TIME(): FieldUtil<PpTelecomUserLogCU>{ 
        return PpTelecomUserLogMU.USE_TIME;
    }
    get PHONE(): FieldUtil<PpTelecomUserLogCU>{ 
        return PpTelecomUserLogMU.PHONE;
    }
    get STATE(): FieldUtil<PpTelecomUserLogCU>{ 
        return PpTelecomUserLogMU.STATE;
    }
}
export {PpTelecomUserLogMU, PpTelecomUserLogCU}
