25 lines
521 B
Python
25 lines
521 B
Python
import json
|
|
import uuid
|
|
from datetime import datetime
|
|
|
|
from django.db import models
|
|
from django.utils.translation import gettext_lazy as _
|
|
from django.core.cache import cache
|
|
|
|
class BaseModel(models.Model):
|
|
id = None
|
|
uuid = models.UUIDField(primary_key=True, editable=False, default=uuid.uuid4, unique=True, db_index=True)
|
|
created_at = models.DateTimeField(auto_now_add=True, db_index=True)
|
|
updated_at = models.DateTimeField(auto_now=True, db_index=True)
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|