You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
396 B
18 lines
396 B
import uuid |
|
|
|
from django.db import models |
|
|
|
|
|
class IdentifiedModel(models.Model): |
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) |
|
created_at = models.DateTimeField(auto_now_add=True) |
|
|
|
class Meta: |
|
abstract = True |
|
|
|
|
|
class TimestampedModel(IdentifiedModel): |
|
updated_at = models.DateTimeField(auto_now=True) |
|
|
|
class Meta: |
|
abstract = True
|
|
|