ipg/apps/core/models.py
Sayyid Hamid Mahdavi f0edf10f53 fake gateway
2025-05-31 13:36:25 +03:30

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