✨ Feat: [#10] portfolio 모델 생성
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
from common.models.baseModels import BaseModel
|
||||
|
||||
from django.contrib.postgres.fields import ArrayField
|
||||
from django.conf import settings
|
||||
|
||||
from users.models import User
|
||||
|
||||
|
||||
class Portfolio(BaseModel):
|
||||
name = models.CharField(max_length=20)
|
||||
category = ArrayField(models.CharField(max_length=20), default=list)
|
||||
is_published = models.BooleanField(default=False)
|
||||
view_count = models.IntegerField(default=0)
|
||||
like_count = models.IntegerField(default=0)
|
||||
scrab_count = models.IntegerField(default=0)
|
||||
is_represent = models.BooleanField(default=False)
|
||||
code_id = models.CharField(max_length=26, blank=True)
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='portfolios', to_field="id")
|
||||
Reference in New Issue
Block a user