feat(album): add cover picture functionality to albums and enhance album management API

This commit is contained in:
shiyu
2025-06-09 15:12:50 +08:00
parent 9d9393f9ce
commit e55f311c04
24 changed files with 1496 additions and 251 deletions

View File

@@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
namespace Foxel.Models.Request.Album
{
public class AlbumCreateRequest
{
[Required(ErrorMessage = "相册名称不能为空")]
[StringLength(100, ErrorMessage = "相册名称长度不能超过100个字符")]
public string Name { get; set; } = string.Empty;
[StringLength(500, ErrorMessage = "相册描述长度不能超过500个字符")]
public string? Description { get; set; }
public int? CoverPictureId { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace Foxel.Models.Request.Album
{
public class AlbumUpdateRequest
{
[StringLength(100, ErrorMessage = "相册名称长度不能超过100个字符")]
public string? Name { get; set; }
[StringLength(500, ErrorMessage = "相册描述长度不能超过500个字符")]
public string? Description { get; set; }
public int? CoverPictureId { get; set; }
}
}

View File

@@ -10,4 +10,7 @@ public record CreateAlbumRequest
[StringLength(500)]
public string? Description { get; set; }
public int? CoverPictureId { get; set; }
}