using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using FnbEngine.Domain.AggregatesModel.TableAggregate;

namespace FnbEngine.Infrastructure.EntityConfigurations;

public class TableStatusEntityTypeConfiguration : IEntityTypeConfiguration<TableStatus>
{
    public void Configure(EntityTypeBuilder<TableStatus> builder)
    {
        builder.ToTable("table_statuses");
        builder.HasKey(s => s.Id);
        builder.Property(s => s.Id).HasColumnName("id").ValueGeneratedNever();
        builder.Property(s => s.Name).HasColumnName("name").HasMaxLength(50).IsRequired();
        builder.HasData(TableStatus.Available, TableStatus.Occupied, TableStatus.Reserved, TableStatus.Cleaning);
    }
}
