~sirn/fanboi2

ref: 98796226802a26b82c888365ad5b9cd331006792 fanboi2/fanboi2/models/rule_override.py -rw-r--r-- 517 bytes
98796226Kridsada Thanabulpong Bump copyright year. 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from sqlalchemy.orm import column_property
from sqlalchemy.sql.schema import Column, ForeignKey
from sqlalchemy.sql.sqltypes import Integer, String
from ._base import JsonType
from .rule import Rule


class RuleOverride(Rule):
    """Model class that provides a settings override on top of rule model."""

    __tablename__ = 'rule_override'
    __mapper_args__ = {'polymorphic_identity': 'override'}

    rule_id = Column(Integer, ForeignKey('rule.id'), primary_key=True)
    override = Column(JsonType, default={})