Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""LICENSE
2Copyright 2019 Hermann Krumrey <hermann@krumreyh.com>
4This file is part of otaku-info-bot.
6otaku-info-bot is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
11otaku-info-bot is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
16You should have received a copy of the GNU General Public License
17along with otaku-info-bot. If not, see <http://www.gnu.org/licenses/>.
18LICENSE"""
20from kudubot.db import Base
21from sqlalchemy import Column, Integer, ForeignKey, Boolean
22from sqlalchemy.orm import relationship
25class RankedModeSetting(Base):
26 """
27 Stores a user's preference for ranked mode
28 """
30 __tablename__ = "ranked_mode_settings"
31 """
32 The name of the database table
33 """
35 id = Column(Integer, primary_key=True, autoincrement=True)
36 """
37 The ID of the setting
38 """
40 address_id = Column(Integer, ForeignKey("addressbook.id"))
41 """
42 The ID of the associated address
43 """
45 address = relationship("Address")
46 """
47 The associated address
48 """
50 value = Column(Boolean, nullable=False, default=False)
51 """
52 The current value of the setting
53 """