diff --git a/coinmanager/coinc/models.py b/coinmanager/coinc/models.py index 5063565..bf4bfef 100644 --- a/coinmanager/coinc/models.py +++ b/coinmanager/coinc/models.py @@ -1,6 +1,6 @@ # encoding: utf-8 # -# Copyright (C) 2020 willipink.eu +# Copyright (C) 2020-2022 willipink.eu # Author Moritz Münch moritzmuench@mailbox.org # # This program is free software: you can redistribute it and/or modify @@ -20,7 +20,7 @@ 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) @@ -28,6 +28,8 @@ year_now = int(datetime.now().year) class User(Model): + id = BigAutoField(primary_key=True) + name = CharField('Name', max_length=20, default='Anonym') color = CharField('Farbe', max_length=20, default='purple') @@ -71,6 +73,8 @@ class Stamp(Model): class Coin(Model): + id = BigAutoField(primary_key=True) + value = PositiveSmallIntegerField('Wert', default=100) year = PositiveSmallIntegerField('Jahr', default=year_now)