mirror of
https://github.com/PretendoNetwork/account.git
synced 2024-06-01 03:28:07 -04:00
18b96b06c5
Restructured the codebase a bit. No big changes really. Need to handle registration sessions better
37 lines
802 B
JavaScript
37 lines
802 B
JavaScript
const { Schema, model } = require('mongoose');
|
|
|
|
const DeviceAttributeSchema = new Schema({
|
|
created_date: String,
|
|
name: String,
|
|
value: String,
|
|
});
|
|
|
|
const DeviceAttribute = model('DeviceAttribute', DeviceAttributeSchema);
|
|
|
|
const DeviceSchema = new Schema({
|
|
is_emulator: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
console_type: {
|
|
type: String,
|
|
enum: ['wup', 'ctr', 'spr', 'ftr', 'ktr', 'red', 'jan'] // wup is WiiU, the rest are the 3DS family. Only wup is used atm
|
|
},
|
|
device_id: Number,
|
|
device_type: Number,
|
|
serial: String,
|
|
device_attributes: [DeviceAttributeSchema],
|
|
soap: {
|
|
token: String,
|
|
account_id: Number,
|
|
}
|
|
});
|
|
|
|
const Device = model('Device', DeviceSchema);
|
|
|
|
module.exports = {
|
|
DeviceSchema,
|
|
Device,
|
|
DeviceAttributeSchema,
|
|
DeviceAttribute
|
|
}; |