feat: Post 비공개 기능 추가
Some checks failed
Build And Test / build-and-push (push) Has been cancelled

- Post 모델에 is_private 필드 추가
- 비공개 게시글은 작성자만 목록/상세에서 조회 가능
- 공개/비공개 토글 기능 지원

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-25 12:56:05 +09:00
parent c02851e4d3
commit d87d70997b
5 changed files with 59 additions and 7 deletions

View File

@ -25,6 +25,7 @@ class Post(models.Model):
updated_at = models.DateTimeField(auto_now=True)
author_id = models.CharField(max_length=150, blank=True, default='')
author_name = models.CharField(max_length=150)
is_private = models.BooleanField(default=False) # 비공개 여부 (True: 작성자만 볼 수 있음)
class Meta:
ordering = ['-created_at']