1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Start work on a Brawlhalla command

This commit is contained in:
Steffo 2020-03-18 18:06:15 +01:00
parent 50e188df3b
commit e1cd6bffd6
2 changed files with 38 additions and 0 deletions

View file

@ -9,6 +9,7 @@ from .fiorygi import Fiorygi
from .steam import Steam from .steam import Steam
from .dota import Dota from .dota import Dota
from .fiorygitransactions import FiorygiTransaction from .fiorygitransactions import FiorygiTransaction
from .brawlhalla import Brawlhalla
# Enter the tables of your Pack here! # Enter the tables of your Pack here!
available_tables = [ available_tables = [
@ -22,6 +23,7 @@ available_tables = [
Steam, Steam,
Dota, Dota,
FiorygiTransaction, FiorygiTransaction,
Brawlhalla,
] ]
# Don't change this, it should automatically generate __all__ # Don't change this, it should automatically generate __all__

View file

@ -0,0 +1,36 @@
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declared_attr
import steam
class Brawlhalla:
__tablename__ = "brawlhalla"
@declared_attr
def brawlhalla_id(self):
return Column(Integer, primary_key=True)
@declared_attr
def _steamid(self):
return Column(BigInteger, ForeignKey("steam._steamid"), primary_key=True)
@declared_attr
def steam(self):
return relationship("Steam", backref=backref("brawlhalla", uselist=False))
@property
def steamid(self):
return steam.SteamID(self._steamid)
@declared_attr
def name(self):
return Column(String)
@declared_attr
def rating_1v1(self):
return Column(Integer)
@property
def tier_1v1(self):
return Column(String)