Clean up domain entities: shared picture value object, lifecycle and ownership interfaces, explicit tables

This commit is contained in:
2026-09-24 11:43:50 +02:00
parent 4d943e068e
commit 5a0f82b77b
45 changed files with 122 additions and 190 deletions
@@ -3,25 +3,21 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Musify.Domain.Entities;
#pragma warning disable CS8618
[Table("UserFollows")]
public class UserFollow
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
public required long FollowerId { get; set; }
[Required]
public required long FollowedId { get; set; }
[Required]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
[ForeignKey(nameof(FollowerId))]
public User Follower { get; set; }
public User Follower { get; set; } = null!;
[ForeignKey(nameof(FollowedId))]
public User Followed { get; set; }
public User Followed { get; set; } = null!;
}