using ClaudeDo.Data.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace ClaudeDo.Data.Configuration;

public class SessionSkillEntityConfiguration : IEntityTypeConfiguration<SessionSkillEntity>
{
    public void Configure(EntityTypeBuilder<SessionSkillEntity> builder)
    {
        builder.ToTable("session_skills");

        builder.HasKey(s => s.Name);
        builder.Property(s => s.Name).HasColumnName("name");
        builder.Property(s => s.SourceUrl).HasColumnName("source_url").IsRequired();
        builder.Property(s => s.PinnedRef).HasColumnName("pinned_ref").IsRequired();
        builder.Property(s => s.Subpath).HasColumnName("subpath").IsRequired();
        builder.Property(s => s.Description).HasColumnName("description").IsRequired();
        builder.Property(s => s.AddedAt).HasColumnName("added_at").IsRequired();
    }
}
