This commit is contained in:
2025-11-26 14:01:54 +05:00
parent f04130d769
commit a08c6ad800
5 changed files with 69 additions and 7 deletions

View File

@@ -2,12 +2,16 @@ from django.db import models
from django_core.models.base import AbstractBaseModel
from django.utils.translation import gettext_lazy as _
from django.contrib.auth import get_user_model
from model_bakery import baker
class SearchHistory(AbstractBaseModel):
value = models.CharField(verbose_name=_('Search History'), max_length=255)
user = models.ForeignKey(get_user_model(), verbose_name=_('User'), on_delete=models.CASCADE)
@classmethod
def _baker(cls):
return baker.make(cls)
def __str__(self):
return str(self.pk)