@@ -180,6 +180,8 @@ class Member(models.Model): # id automatisk...
180180 undo_count = models .IntegerField (default = 0 ) # for 'undos' i alt
181181 notes = models .TextField (blank = True )
182182 signup_due_paid = models .BooleanField (default = True )
183+ created_at = models .DateTimeField (auto_now_add = True )
184+ updated_at = models .DateTimeField (auto_now = True )
183185
184186 stregforbud_override = False
185187
@@ -347,6 +349,8 @@ class Meta:
347349 timestamp = models .DateTimeField (auto_now_add = True )
348350 amount = models .IntegerField () # penge, oere...
349351 notes = models .TextField (blank = True )
352+ created_at = models .DateTimeField (auto_now_add = True )
353+ updated_at = models .DateTimeField (auto_now = True )
350354
351355 @deprecated
352356 def amount_display (self ):
@@ -586,6 +590,8 @@ class Product(models.Model): # id automatisk...
586590 rooms = models .ManyToManyField (Room , blank = True )
587591 alcohol_content_ml = models .FloatField (default = 0.0 , null = True )
588592 caffeine_content_mg = models .IntegerField (default = 0 )
593+ created_at = models .DateTimeField (auto_now_add = True )
594+ updated_at = models .DateTimeField (auto_now = True )
589595
590596 @deprecated
591597 def __unicode__ (self ):
@@ -646,6 +652,8 @@ class ProductNote(models.Model):
646652 start_date = models .DateField ()
647653 end_date = models .DateField ()
648654 comment = models .TextField (blank = True )
655+ created_at = models .DateTimeField (auto_now_add = True )
656+ updated_at = models .DateTimeField (auto_now = True )
649657
650658 def __str__ (self ):
651659 return self .text + " (" + " | " .join (str (x .name ) for x in self .products .all ()) + ")"
@@ -681,6 +689,8 @@ class Sale(models.Model):
681689 room = models .ForeignKey (Room , on_delete = models .CASCADE , null = True )
682690 timestamp = models .DateTimeField (auto_now_add = True )
683691 price = models .IntegerField ()
692+ created_at = models .DateTimeField (auto_now_add = True )
693+ updated_at = models .DateTimeField (auto_now = True )
684694
685695 class Meta :
686696 index_together = [
@@ -721,6 +731,8 @@ class News(models.Model):
721731 text = models .TextField ()
722732 pub_date = models .DateTimeField ()
723733 stop_date = models .DateTimeField ()
734+ created_at = models .DateTimeField (auto_now_add = True )
735+ updated_at = models .DateTimeField (auto_now = True )
724736
725737 class Meta :
726738 verbose_name_plural = "News"
@@ -739,6 +751,8 @@ class Meta:
739751
740752 member = models .ForeignKey (Member , on_delete = models .CASCADE , null = False )
741753 due = models .IntegerField (default = 200 * 100 )
754+ created_at = models .DateTimeField (auto_now_add = True )
755+ updated_at = models .DateTimeField (auto_now = True )
742756
743757 def generate_mobilepay_url (self ):
744758 comment = self .member .username
@@ -847,6 +861,8 @@ class Theme(models.Model):
847861 begin_day = models .PositiveSmallIntegerField ("Begin day" , default = 1 )
848862 end_month = models .PositiveSmallIntegerField ("End month" )
849863 end_day = models .PositiveSmallIntegerField ("End day" , default = 31 )
864+ created_at = models .DateTimeField (auto_now_add = True )
865+ updated_at = models .DateTimeField (auto_now = True )
850866
851867 NONE = "N"
852868 SHOW = "S"
0 commit comments