~sirn/fanboi2

ref: 834edf0edc5dd633c0ecea16231b6ed2d728476d fanboi2/fanboi2/models/rule_ban.py -rw-r--r-- 370 bytes
834edf0eKridsada Thanabulpong Massive cleanup in preparation for 0.30 (#25) 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
from sqlalchemy.sql.schema import Column, ForeignKey
from sqlalchemy.sql.sqltypes import Integer

from .rule import Rule


class RuleBan(Rule):
    """Model class that provides a banlist on top of rule model."""

    __tablename__ = 'rule_ban'
    __mapper_args__ = {'polymorphic_identity': 'ban'}

    rule_id = Column(Integer, ForeignKey('rule.id'), primary_key=True)