add: add product and category models
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
from .base import *
|
||||
from .banner import *
|
||||
11
core/apps/shared/models/banner.py
Normal file
11
core/apps/shared/models/banner.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from django.db import models
|
||||
|
||||
from core.apps.shared.models import BaseModel
|
||||
|
||||
|
||||
class Banner(BaseModel):
|
||||
banner = models.ImageField(upload_to='shared/banners/')
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'banner'
|
||||
verbose_name_plural = 'bannerlar'
|
||||
@@ -6,7 +6,7 @@ from django.db import models
|
||||
|
||||
class BaseModel(models.Model):
|
||||
id = models.UUIDField(primary_key=True, editable=False, unique=True, default=uuid.uuid4)
|
||||
created_at = models.DateTimeField(auto_created=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
Reference in New Issue
Block a user