settings UI added, save locale to database
This commit is contained in:
@ -18,14 +18,15 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from database import db, Optional, Required, PrimaryKey
|
||||
from database import db, Optional, Required, PrimaryKey, db_session
|
||||
|
||||
|
||||
class UserSetting(db.Entity):
|
||||
|
||||
id = PrimaryKey(int, auto=False) # Telegram User ID
|
||||
id = PrimaryKey(int, auto=False, size=64) # Telegram User ID
|
||||
lang = Optional(str, default='en') # The language setting for this user
|
||||
stats = Optional(bool, default=False) # Opt-in to keep game statistics
|
||||
first_places = Optional(int, default=0) # Nr. of games won in first place
|
||||
games_played = Optional(int, default=0) # Nr. of games completed
|
||||
cards_played = Optional(int, default=0) # Nr. of cards played
|
||||
cards_played = Optional(int, default=0) # Nr. of cards played total
|
||||
use_keyboards = Optional(bool, default=False) # Use keyboards (unused)
|
||||
|
Reference in New Issue
Block a user