summaryrefslogtreecommitdiff
path: root/pedidos-ya/app/core/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'pedidos-ya/app/core/models.py')
-rw-r--r--pedidos-ya/app/core/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pedidos-ya/app/core/models.py b/pedidos-ya/app/core/models.py
new file mode 100644
index 0000000..a68c513
--- /dev/null
+++ b/pedidos-ya/app/core/models.py
@@ -0,0 +1,10 @@
+from django.db import models
+
+
+class TimeStampMixin(models.Model):
+ """Mixin to add created_at and updated_at to all models"""
+ created_at = models.DateTimeField(auto_now_add=True)
+ updated_at = models.DateTimeField(auto_now=True)
+
+ class Meta:
+ abstract = True