forked from RealMCoded/LunarRec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.js
103 lines (96 loc) · 3.4 KB
/
database.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
const Sequelize = require('sequelize');
const sequelize = new Sequelize('database', "", "", {
host: 'localhost',
dialect: 'sqlite',
logging: false,
storage: 'database.sqlite'
})
const users = sequelize.define('users', {
username:{
type: Sequelize.STRING,
unique: true,
},
display_name:{
type: Sequelize.STRING,
},
linked_steam_id:{
type: Sequelize.STRING,
defaultValue: "0"
},
settings:{
type: Sequelize.STRING,
defaultValue: JSON.stringify([{"Key":"Recroom.OOBE","Value":"100"}])
//defaultValue: JSON.stringify([{"Key":"MOD_BLOCKED_TIME","Value":"0"},{"Key":"MOD_BLOCKED_DURATION","Value":"0"},{"Key":"PlayerSessionCount","Value":"0"},{"Key":"ShowRoomCenter","Value":"1"},{"Key":"QualitySettings","Value":"3"},{"Key":"Recroom.OOBE","Value":"100"},{"Key":"VoiceFilter","Value":"0"},{"Key":"VIGNETTED_TELEPORT_ENABLED","Value":"0"},{"Key":"CONTINUOUS_ROTATION_MODE","Value":"0"},{"Key":"ROTATION_INCREMENT","Value":"0"},{"Key":"ROTATE_IN_PLACE_ENABLED","Value":"0"},{"Key":"TeleportBuffer","Value":"0"},{"Key":"VoiceChat","Value":"1"},{"Key":"PersonalBubble","Value":"0"},{"Key":"ShowNames","Value":"1"},{"Key":"H.264 plugin","Value":"1"}])
},
avatar:{
type: Sequelize.STRING,
defaultValue: JSON.stringify({"OutfitSelections":"b33dbeee-5bdd-443d-aa6a-761248054e08,,,,1;6d48c545-22bb-46c1-a29d-0a38af387143,,,,2;6d48c545-22bb-46c1-a29d-0a38af387143,,,,3;102c625b-b988-4bf8-a2aa-a31ad7029cdc,bd4a84e2-b67a-4269-a26a-17fb23ddb09e,ccf1ccc1-e229-4157-bb74-f2cdef01e547,,0;d0a9262f-5504-46a7-bb10-7507503db58e,ba6b6e1a-a09a-4ba0-9523-552869f03336,,d461ca71-45c9-415e-8e09-ba93e8d73450,1;193a3bf9-abc0-4d78-8d63-92046908b1c5,,,,0;3a790be3-2937-44d4-be01-b5d65353bd3d,,,,2;3a790be3-2937-44d4-be01-b5d65353bd3d,,,,3;e15b13a7-9e9a-4b32-ba2c-0cb31ed55a8c,,,,1","FaceFeatures":"{\"ver\":3,\"eyeId\":\"AjGMoJhEcEehacRZjUMuDg\",\"eyePos\":{\"x\":0.0,\"y\":0.0},\"eyeScl\":0.0,\"mouthId\":\"FrZBRanXEEK29yKJ4jiMjg\",\"mouthPos\":{\"x\":0.0,\"y\":0.0},\"mouthScl\":0.0,\"beardColorId\":\"befcc00a-a2e6-48e4-864c-593d57bbbb5b\"}","SkinColor":"85343b16-d58a-4091-96d8-083a81fb03ae","HairColor":"befcc00a-a2e6-48e4-864c-593d57bbbb5b"})
},
relationships:{
type: Sequelize.STRING,
defaultValue: "[]"
},
xp:{
type: Sequelize.INTEGER,
defaultValue: 48
},
level:{
type: Sequelize.INTEGER,
defaultValue: 10
},
reputation:{
type: Sequelize.INTEGER,
defaultValue: 0
},
session:{
type: Sequelize.STRING,
defaultValue: null
},
isDev:{
type: Sequelize.BOOLEAN,
defaultValue: false
},
moderation:{
type: Sequelize.STRING,
defaultValue: JSON.stringify({banned: false, reason: "", expires: 0})
}
});
/**
* Unused tables for now, they are defined but never used anywhere in the code.
* For eventual future use if I ever add them.
*/
const leaderboards = sequelize.define('leaderboards', {
room: {
type: Sequelize.STRING,
},
stats: {
type: Sequelize.STRING,
defaultValue: JSON.stringify({})
}
})
const rooms = sequelize.define('rooms', {
name:{
type: Sequelize.STRING,
unique: true,
},
creator:{
type: Sequelize.STRING,
}
})
const images = sequelize.define('images', {
name:{
type: Sequelize.STRING,
unique: true,
},
creator:{
type: Sequelize.STRING,
},
tagged_users:{
type: Sequelize.STRING,
defaultValue: "[]"
},
room: {
type: Sequelize.STRING,
}
})
module.exports = { users }