From 64a8763c725fb6d9a7cab93cfae6ede21b0f7b78 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Thu, 27 Mar 2025 16:57:49 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Feat:=20[#10]=20portfolio=20?= =?UTF-8?q?=EB=AA=A8=EB=8D=B8=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- portfolios/models.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/portfolios/models.py b/portfolios/models.py index 71a8362..6a68602 100644 --- a/portfolios/models.py +++ b/portfolios/models.py @@ -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") \ No newline at end of file