Clean up domain entities: shared picture value object, lifecycle and ownership interfaces, explicit tables
This commit is contained in:
@@ -3,25 +3,21 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Musify.Domain.Entities;
|
||||
|
||||
#pragma warning disable CS8618
|
||||
[Table("MixItems")]
|
||||
public class MixItem
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
public required Guid MixId { get; set; }
|
||||
|
||||
[Required]
|
||||
public int Position { get; set; } = 0;
|
||||
public int Position { get; set; }
|
||||
|
||||
[Required]
|
||||
public required Guid TrackId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(MixId))]
|
||||
public Mix Mix { get; set; }
|
||||
public Mix Mix { get; set; } = null!;
|
||||
|
||||
[ForeignKey(nameof(TrackId))]
|
||||
public Track Track { get; set; }
|
||||
public Track Track { get; set; } = null!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user