41 lines
882 B
Python
41 lines
882 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
|
|
|
|
|
|
|
|
class BasePGModel(models.Model):
|
|
created_at = models.DateTimeField(auto_now_add=True, db_index=True)
|
|
updated_at = models.DateTimeField(auto_now=True, db_index=True)
|
|
|
|
def make_request(self):
|
|
pass
|
|
|
|
def confirm_request(self, request=None):
|
|
pass
|
|
|
|
def reverse_request(self):
|
|
pass
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|