namespace GameServer.Models.Portfolio { // 카테고리 조회 응답 public class CategoryDto { public int CategoryNo { get; set; } public string Slug { get; set; } = string.Empty; public string Name { get; set; } = string.Empty; public string? Description { get; set; } public string? Accent { get; set; } public int SortOrder { get; set; } // 해당 카테고리에 속한 게시물 수 public int PostCount { get; set; } } // 카테고리 생성/수정 요청 public class CategoryUpsertDto { public string Slug { get; set; } = string.Empty; public string Name { get; set; } = string.Empty; public string? Description { get; set; } public string? Accent { get; set; } public int SortOrder { get; set; } } // 게시물 이미지 조회 응답 public class PostImageDto { public int ImageNo { get; set; } public string ImageUrl { get; set; } = string.Empty; public string? Caption { get; set; } public int SortOrder { get; set; } } // 목록용 게시물 요약 (카테고리 정보 포함) public class PostSummaryDto { public int PostNo { get; set; } public int CategoryNo { get; set; } public string CategorySlug { get; set; } = string.Empty; public string CategoryName { get; set; } = string.Empty; public string? CategoryAccent { get; set; } public string Title { get; set; } = string.Empty; public string? Summary { get; set; } public string? ThumbnailUrl { get; set; } public int ImageCount { get; set; } public DateTime CreatedAt { get; set; } public DateTime UpdatedAt { get; set; } } // 상세 조회 응답 (본문 + 이미지 목록 추가) public class PostDetailDto : PostSummaryDto { public string? ContentMd { get; set; } public List Images { get; set; } = new(); } // 게시물 생성/수정 요청 public class PostUpsertDto { public int CategoryNo { get; set; } public string Title { get; set; } = string.Empty; public string? Summary { get; set; } public string? ContentMd { get; set; } public string? ThumbnailUrl { get; set; } public List Images { get; set; } = new(); } // 게시물 이미지 생성/수정 요청 public class PostImageUpsertDto { public string ImageUrl { get; set; } = string.Empty; public string? Caption { get; set; } public int SortOrder { get; set; } } // 관리자 로그인 요청 public class LoginRequestDto { public string Password { get; set; } = string.Empty; } // 로그인 상태 응답 public class AuthStateDto { public bool Authenticated { get; set; } } // 이미지 업로드 결과 public class UploadResultDto { public string Url { get; set; } = string.Empty; public string FileName { get; set; } = string.Empty; public long Size { get; set; } } /// 업로드 한도 안내. 편집기가 보내기 전에 미리 확인하는 용도입니다. public class UploadLimitDto { public long MaxBytes { get; set; } public double MaxMegabytes { get; set; } public List AllowedExtensions { get; set; } = new(); } }