Feat: [#10] portfolio 모델 생성

This commit is contained in:
sm4640
2025-03-27 16:57:49 +09:00
parent c8d4dd6513
commit 64a8763c72

View File

@@ -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")