using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace e_suite.Database.Core.UnitTests.Helpers.Tables;

[Table("TableWithKey", Schema = "StandAlone")]
public class TableWithKey
{
    [Key]
    public long Id { get; set; }

    [Required] public int TotalTimeMS { get; set; }

    public static void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<TableWithKey>()
            .HasData(new TableWithKey
            {
                Id = 1,
                TotalTimeMS = 2000
            }
            );
    }
}