erste version
parent
9efb14938b
commit
af131b89c3
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "sshtunnel"]
|
||||||
|
path = sshtunnel
|
||||||
|
url = https://github.com/Hofei90/sshtunnel.git
|
@ -1,26 +1,44 @@
|
|||||||
import peewee
|
import peewee
|
||||||
|
|
||||||
|
|
||||||
database = peewee.Proxy()
|
DATABASE = peewee.Proxy()
|
||||||
|
|
||||||
|
|
||||||
class BaseModel(peewee.Model):
|
class BaseModel(peewee.Model):
|
||||||
class Meta:
|
class Meta:
|
||||||
database = database
|
database = DATABASE
|
||||||
|
|
||||||
|
|
||||||
class CoDUser(BaseModel):
|
class CoDUser(BaseModel):
|
||||||
user = peewee.TextField()
|
user = peewee.TextField()
|
||||||
|
|
||||||
|
|
||||||
class CoDStats(BaseModel):
|
class CoDStandardStats(BaseModel):
|
||||||
ts = peewee.DateTimeField()
|
ts = peewee.DateTimeField()
|
||||||
typ = peewee.TextField()
|
user = peewee.TextField()
|
||||||
value = peewee.FloatField()
|
kills = peewee.IntegerField()
|
||||||
|
deaths = peewee.IntegerField()
|
||||||
|
assists = peewee.IntegerField()
|
||||||
|
suicides = peewee.IntegerField()
|
||||||
|
total_games_played = peewee.IntegerField()
|
||||||
|
wins = peewee.IntegerField()
|
||||||
|
losses = peewee.IntegerField()
|
||||||
|
ties = peewee.IntegerField()
|
||||||
|
time_played_total = peewee.IntegerField()
|
||||||
|
average_life = peewee.FloatField()
|
||||||
|
career_score = peewee.IntegerField()
|
||||||
|
headshots = peewee.IntegerField()
|
||||||
|
total_shots = peewee.IntegerField()
|
||||||
|
hits = peewee.IntegerField()
|
||||||
|
misses = peewee.IntegerField()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
primary_key = peewee.CompositeKey('ts', 'typ')
|
primary_key = peewee.CompositeKey("ts", "user")
|
||||||
|
|
||||||
|
|
||||||
def create_tables():
|
def create_tables():
|
||||||
database.create_tables([TestPeewee])
|
DATABASE.create_tables([CoDUser, CoDStandardStats])
|
||||||
|
|
||||||
|
|
||||||
|
def create_hypertable():
|
||||||
|
DATABASE.execute_sql("SELECT create_hypertable('CoDStandardStats', 'ts');")
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
peewee~=3.13.3
|
peewee~=3.13.3
|
||||||
requests~=2.23.0
|
requests~=2.23.0
|
||||||
toml~=0.10.0
|
toml~=0.10.0
|
||||||
|
paramiko
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit c6532d0fd8027ca2ffcf1a90a02b6dd47837170a
|
Loading…
Reference in New Issue