This commit is contained in:
Moritz Münch 2022-01-16 14:21:25 +01:00
parent 8dacdb21f6
commit 33c98b1478

View File

@ -1,6 +1,6 @@
# encoding: utf-8 # encoding: utf-8
# #
# Copyright (C) 2020 willipink.eu # Copyright (C) 2020-2022 willipink.eu
# Author Moritz Münch moritzmuench@mailbox.org # Author Moritz Münch moritzmuench@mailbox.org
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@ -20,7 +20,7 @@
from datetime import datetime, date from datetime import datetime, date
from django.db.models import BooleanField, CASCADE, CharField, DateField, DateTimeField, ForeignKey, Model, PositiveIntegerField, PositiveSmallIntegerField, TextField from django.db.models import BigAutoField, BooleanField, CASCADE, CharField, DateField, DateTimeField, ForeignKey, Model, PositiveIntegerField, PositiveSmallIntegerField, TextField
year_now = int(datetime.now().year) year_now = int(datetime.now().year)
@ -28,6 +28,8 @@ year_now = int(datetime.now().year)
class User(Model): class User(Model):
id = BigAutoField(primary_key=True)
name = CharField('Name', max_length=20, default='Anonym') name = CharField('Name', max_length=20, default='Anonym')
color = CharField('Farbe', max_length=20, default='purple') color = CharField('Farbe', max_length=20, default='purple')
@ -71,6 +73,8 @@ class Stamp(Model):
class Coin(Model): class Coin(Model):
id = BigAutoField(primary_key=True)
value = PositiveSmallIntegerField('Wert', default=100) value = PositiveSmallIntegerField('Wert', default=100)
year = PositiveSmallIntegerField('Jahr', default=year_now) year = PositiveSmallIntegerField('Jahr', default=year_now)