-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDDRScoreDB.py
73 lines (60 loc) · 2.01 KB
/
DDRScoreDB.py
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
from peewee import *
import datetime
db = SqliteDatabase('score_db.db')
class BaseModel(Model):
class Meta:
database = db
class User(BaseModel):
id = IntegerField(primary_key=True)
display_name = TextField()
class Score(BaseModel):
id = IntegerField(primary_key=True)
user = ForeignKeyField(User, backref='score')
song_title = TextField()
song_artist = TextField()
difficulty_number = IntegerField()
difficulty_name = TextField()
letter_grade = TextField()
full_combo = TextField()
doubles_play = BooleanField()
money_score = IntegerField()
ex_score = IntegerField()
marv_count = IntegerField()
perf_count = IntegerField()
great_count = IntegerField()
good_count = IntegerField()
OK_count = IntegerField()
miss_count = IntegerField()
max_combo = IntegerField()
recorded_time = DateTimeField(default=datetime.datetime.utcnow)
file_name = TextField()
name_confidence = FloatField()
class IIDXScore(BaseModel):
id = IntegerField(primary_key=True)
user = ForeignKeyField(User, backref='iidxscore')
song_title = TextField()
song_artist = TextField()
difficulty = TextField()
clear_type = TextField()
dj_grade = TextField()
double_play = BooleanField()
ex_score = IntegerField()
p_great_count = IntegerField()
great_count = IntegerField()
good_count = IntegerField()
bad_count = IntegerField()
poor_count = IntegerField()
combo_break = IntegerField()
miss_count = IntegerField()
fast_count = IntegerField()
slow_count = IntegerField()
recorded_time = DateTimeField(default=datetime.datetime.utcnow)
file_name = TextField()
overall_confidence = FloatField()
class DBTaskWorkItem(object):
def __init__(self, discordID, imageFilename, imageTimestampStr, redo=False, game='ddr'):
self.discord_id = discordID
self.image_filename = imageFilename
self.timestamp_string = imageTimestampStr
self.game = game
self.redo = redo