Files
colio/portfolios/models.py
2025-03-27 16:57:49 +09:00

20 lines
775 B
Python

from django.db import models
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")