Fixed all relationship and write errors in all entities

This commit is contained in:
2025-10-07 23:28:16 +01:00
parent 9a5c83161a
commit 89be35ecb0
31 changed files with 124 additions and 104 deletions

View File

@@ -1,14 +1,16 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
[PrimaryKey(nameof(ShowId), nameof(SoundId))]
public class SoundTimecode
{
[Key] public int Id { get; set; }
[Required] public int ShowId { get; set; }
public Show? Show { get; set; }
[Required] public int SoundId { get; set; }
public Sound? Sound { get; set; }
[Required, Range(0, int.MaxValue)] public int Start { get; set; }
[Required, Range(0, int.MaxValue)] public int End { get; set; }
[Required] public decimal Start { get; set; }
[Required] public decimal End { get; set; }
}