import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { BusUserSubpayAuth } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-11-12 17:31
 */
interface BusUserSubpayAuthCU extends ConditionUtil<BusUserSubpayAuthCU>{
    ID:FieldUtil<BusUserSubpayAuthCU>;
    USER_ID:FieldUtil<BusUserSubpayAuthCU>;
    OWNER_USER_ID:FieldUtil<BusUserSubpayAuthCU>;
    LOT_ID:FieldUtil<BusUserSubpayAuthCU>;
    LOT_NAME:FieldUtil<BusUserSubpayAuthCU>;
    COME_TIME:FieldUtil<BusUserSubpayAuthCU>;
    CAR_PLATE_NUM:FieldUtil<BusUserSubpayAuthCU>;
    CREATE_TIME:FieldUtil<BusUserSubpayAuthCU>;
    AUTH_STATE:FieldUtil<BusUserSubpayAuthCU>;
}

class BusUserSubpayAuthCUImpl extends ConditionUtilImpl<BusUserSubpayAuthCUImpl> implements BusUserSubpayAuthCU{ 
    newInstance(): BusUserSubpayAuthCUImpl {
        return new BusUserSubpayAuthCUImpl();
    } 
    get ID(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('ID','id','ID', this);
    }
    get USER_ID(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('USER_ID','userId','被授权的用户ID', this);
    }
    get OWNER_USER_ID(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('OWNER_USER_ID','ownerUserId','认证车主的用户ID', this);
    }
    get LOT_ID(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('LOT_ID','lotId','车场ID', this);
    }
    get LOT_NAME(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('LOT_NAME','lotName','车场名称', this);
    }
    get COME_TIME(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('COME_TIME','comeTime','入场时间', this);
    }
    get CAR_PLATE_NUM(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('CAR_PLATE_NUM','carPlateNum','车牌号', this);
    }
    get CREATE_TIME(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get AUTH_STATE(): FieldUtil<BusUserSubpayAuthCU>{  
        return new FieldUtil('AUTH_STATE','authState','授权状态：1授权，0拒绝', this);
    }
}

@Singleton 
class BusUserSubpayAuthMU extends TableUtilImpl<BusUserSubpayAuthCU,BusUserSubpayAuth>{ 
    tableName  = 'bus_user_subpay_auth';
    tableFields  = ['ID','USER_ID','OWNER_USER_ID','LOT_ID','LOT_NAME','COME_TIME','CAR_PLATE_NUM','CREATE_TIME','AUTH_STATE'];
    modelFields  = ['id','userId','ownerUserId','lotId','lotName','comeTime','carPlateNum','createTime','authState'];
    modelIdFields  = ['id'];
    tableIdFields  = ['ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): BusUserSubpayAuthCU {
        return new BusUserSubpayAuthCUImpl();
    }   

    static get ID(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('ID','id','ID', new BusUserSubpayAuthCUImpl());
    }
    static get USER_ID(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('USER_ID','userId','被授权的用户ID', new BusUserSubpayAuthCUImpl());
    }
    static get OWNER_USER_ID(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('OWNER_USER_ID','ownerUserId','认证车主的用户ID', new BusUserSubpayAuthCUImpl());
    }
    static get LOT_ID(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('LOT_ID','lotId','车场ID', new BusUserSubpayAuthCUImpl());
    }
    static get LOT_NAME(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('LOT_NAME','lotName','车场名称', new BusUserSubpayAuthCUImpl());
    }
    static get COME_TIME(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('COME_TIME','comeTime','入场时间', new BusUserSubpayAuthCUImpl());
    }
    static get CAR_PLATE_NUM(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('CAR_PLATE_NUM','carPlateNum','车牌号', new BusUserSubpayAuthCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BusUserSubpayAuthCUImpl());
    }
    static get AUTH_STATE(): FieldUtil<BusUserSubpayAuthCU>{ 
        return new FieldUtil('AUTH_STATE','authState','授权状态：1授权，0拒绝', new BusUserSubpayAuthCUImpl());
    }

    get ID(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.ID;
    }
    get USER_ID(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.USER_ID;
    }
    get OWNER_USER_ID(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.OWNER_USER_ID;
    }
    get LOT_ID(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.LOT_ID;
    }
    get LOT_NAME(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.LOT_NAME;
    }
    get COME_TIME(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.COME_TIME;
    }
    get CAR_PLATE_NUM(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.CAR_PLATE_NUM;
    }
    get CREATE_TIME(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.CREATE_TIME;
    }
    get AUTH_STATE(): FieldUtil<BusUserSubpayAuthCU>{ 
        return BusUserSubpayAuthMU.AUTH_STATE;
    }
}
export {BusUserSubpayAuthMU, BusUserSubpayAuthCU}
