How to use the cassiopeia.type.dto.common.BaseDB function in cassiopeia

To help you get started, we’ve selected a few cassiopeia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github meraki-analytics / cassiopeia / cassiopeia / type / dto / staticdata.py View on Github external
def _sa_bind_skin():
    global Skin

    @cassiopeia.type.core.common.inheritdocs
    class Skin(Skin, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "Skin"
        id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
        name = sqlalchemy.Column(sqlalchemy.String(30))
        num = sqlalchemy.Column(sqlalchemy.Integer)
        _champion_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("Champion.id", ondelete="CASCADE"))
github meraki-analytics / cassiopeia / cassiopeia / type / dto / staticdata.py View on Github external
def _sa_bind_image():
    global Image

    @cassiopeia.type.core.common.inheritdocs
    class Image(Image, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "Image"
        full = sqlalchemy.Column(sqlalchemy.String(50))
        group = sqlalchemy.Column(sqlalchemy.String(30))
        h = sqlalchemy.Column(sqlalchemy.Integer)
        sprite = sqlalchemy.Column(sqlalchemy.String(30))
        w = sqlalchemy.Column(sqlalchemy.Integer)
        x = sqlalchemy.Column(sqlalchemy.Integer)
        y = sqlalchemy.Column(sqlalchemy.Integer)
        _id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
        _is_alt = sqlalchemy.Column(sqlalchemy.Boolean)
        _passive_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("Passive._id", ondelete="CASCADE"))
        _c_spell_key = sqlalchemy.Column(sqlalchemy.String(30), sqlalchemy.ForeignKey("ChampionSpell.key", ondelete="CASCADE"))
        _champion_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("Champion.id", ondelete="CASCADE"))
        _item_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("Item.id", ondelete="CASCADE"))
        _map_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("MapDetails.mapId", ondelete="CASCADE"))
        _mastery_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("Mastery.id", ondelete="CASCADE"))
github meraki-analytics / cassiopeia / cassiopeia / type / dto / matchhistory.py View on Github external
def _sa_bind_participant_stats():
    global ParticipantStats
    @cassiopeia.type.core.common.inheritdocs
    class ParticipantStats(ParticipantStats, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "HistoryParticipantStats"
        assists = sqlalchemy.Column(sqlalchemy.Integer)
        champLevel = sqlalchemy.Column(sqlalchemy.Integer)
        combatPlayerScore = sqlalchemy.Column(sqlalchemy.Integer)
        deaths = sqlalchemy.Column(sqlalchemy.Integer)
        doubleKills = sqlalchemy.Column(sqlalchemy.Integer)
        firstBloodAssist = sqlalchemy.Column(sqlalchemy.Boolean)
        firstBloodKill = sqlalchemy.Column(sqlalchemy.Boolean)
        firstInhibitorAssist = sqlalchemy.Column(sqlalchemy.Boolean)
        firstInhibitorKill = sqlalchemy.Column(sqlalchemy.Boolean)
        firstTowerAssist = sqlalchemy.Column(sqlalchemy.Boolean)
        firstTowerKill = sqlalchemy.Column(sqlalchemy.Boolean)
        goldEarned = sqlalchemy.Column(sqlalchemy.Integer)
        goldSpent = sqlalchemy.Column(sqlalchemy.Integer)
        inhibitorKills = sqlalchemy.Column(sqlalchemy.Integer)
        item0 = sqlalchemy.Column(sqlalchemy.Integer)
github meraki-analytics / cassiopeia / cassiopeia / type / dto / match.py View on Github external
def _sa_bind_rune():
    global Rune

    @cassiopeia.type.core.common.inheritdocs
    class Rune(Rune, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "MatchRune"
        rank = sqlalchemy.Column(sqlalchemy.Integer)
        runeId = sqlalchemy.Column(sqlalchemy.Integer)
        _id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
        _participant_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("MatchParticipant._id", ondelete="CASCADE"))
github meraki-analytics / cassiopeia / cassiopeia / type / dto / staticdata.py View on Github external
def _sa_bind_info():
    global Info

    @cassiopeia.type.core.common.inheritdocs
    class Info(Info, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "ChampionInfo"
        attack = sqlalchemy.Column(sqlalchemy.Integer)
        defense = sqlalchemy.Column(sqlalchemy.Integer)
        difficulty = sqlalchemy.Column(sqlalchemy.Integer)
        magic = sqlalchemy.Column(sqlalchemy.Integer)
        _id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
        _champion_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("Champion.id", ondelete="CASCADE"))
github meraki-analytics / cassiopeia / cassiopeia / type / dto / championmastery.py View on Github external
def _sa_bind_champion_mastery():
    global ChampionMastery

    @cassiopeia.type.core.common.inheritdocs
    class ChampionMastery(ChampionMastery, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "ChampionMastery"
        championId = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
        championLevel = sqlalchemy.Column(sqlalchemy.Integer)
        championPoints = sqlalchemy.Column(sqlalchemy.Integer)
        championPointsSinceLastLevel = sqlalchemy.Column(sqlalchemy.Integer)
        championPointsUntilNextLevel = sqlalchemy.Column(sqlalchemy.Integer)
        chestGranted = sqlalchemy.Column(sqlalchemy.Boolean)
        highestGrade = sqlalchemy.Column(sqlalchemy.String(30))
        lastPlayTime = sqlalchemy.Column(sqlalchemy.BigInteger)
        playerId = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
github meraki-analytics / cassiopeia / cassiopeia / type / dto / matchhistory.py View on Github external
def _sa_bind_match_summary():
    global MatchSummary
    @cassiopeia.type.core.common.inheritdocs
    class MatchSummary(MatchSummary, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "HistoryMatch"
        mapId = sqlalchemy.Column(sqlalchemy.Integer)
        matchCreation = sqlalchemy.Column(sqlalchemy.BigInteger)
        matchDuration = sqlalchemy.Column(sqlalchemy.Integer)
        matchId = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
        matchMode = sqlalchemy.Column(sqlalchemy.String(30))
        matchType = sqlalchemy.Column(sqlalchemy.String(30))
        matchVersion = sqlalchemy.Column(sqlalchemy.String(30))
        participantIdentities = sqlalchemy.orm.relationship("cassiopeia.type.dto.matchhistory.ParticipantIdentity", cascade="all, delete-orphan", passive_deletes=True)
        participants = sqlalchemy.orm.relationship("cassiopeia.type.dto.matchhistory.Participant", cascade="all, delete-orphan", passive_deletes=True)
        platformId = sqlalchemy.Column(sqlalchemy.String(30))
        queueType = sqlalchemy.Column(sqlalchemy.String(30))
        region = sqlalchemy.Column(sqlalchemy.String(30))
        season = sqlalchemy.Column(sqlalchemy.String(30))
github meraki-analytics / cassiopeia / cassiopeia / type / dto / summoner.py View on Github external
def _sa_bind_mastery_page():
    global MasteryPage

    @cassiopeia.type.core.common.inheritdocs
    class MasteryPage(MasteryPage, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "MasteryPage"
        current = sqlalchemy.Column(sqlalchemy.Boolean)
        id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
        masteries = sqlalchemy.orm.relationship("cassiopeia.type.dto.summoner.Mastery", cascade="all, delete-orphan, delete, merge", passive_deletes=True)
        name = sqlalchemy.Column(sqlalchemy.String(50))
github meraki-analytics / cassiopeia / cassiopeia / type / dto / match.py View on Github external
def _sa_bind_position():
    global Position

    @cassiopeia.type.core.common.inheritdocs
    class Position(Position, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "MatchPosition"
        x = sqlalchemy.Column(sqlalchemy.Integer)
        y = sqlalchemy.Column(sqlalchemy.Integer)
        _id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
        _event_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("MatchEvent._id", ondelete="CASCADE"))
        _frame_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey("MatchParticipantFrame._id", ondelete="CASCADE"))
github meraki-analytics / cassiopeia / cassiopeia / type / dto / staticdata.py View on Github external
def _sa_bind_basic_data_stats():
    global BasicDataStats

    @cassiopeia.type.core.common.inheritdocs
    class BasicDataStats(BasicDataStats, cassiopeia.type.dto.common.BaseDB):
        __tablename__ = "ItemStats"
        FlatArmorMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatAttackSpeedMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatBlockMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatCritChanceMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatCritDamageMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatEXPBonus = sqlalchemy.Column(sqlalchemy.Float)
        FlatEnergyPoolMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatEnergyRegenMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatHPPoolMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatHPRegenMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatMPPoolMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatMPRegenMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatMagicDamageMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatMovementSpeedMod = sqlalchemy.Column(sqlalchemy.Float)
        FlatPhysicalDamageMod = sqlalchemy.Column(sqlalchemy.Float)