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

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Foxel.Models.DataBase;
@@ -14,5 +15,9 @@ public class Album : BaseModel
[Required]
public User User { get; set; }
public int? CoverPictureId { get; set; }
[ForeignKey("CoverPictureId")]
public Picture? CoverPicture { get; set; }
public ICollection<Picture>? Pictures { get; set; }
}