add architecture skeleton
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using GymLogAI.Core.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace GymLogAI.Persistence.Configurations;
|
||||
|
||||
public sealed class ExerciseConfiguration : IEntityTypeConfiguration<Exercise>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Exercise> builder)
|
||||
{
|
||||
builder.ToTable("exercises");
|
||||
builder.HasKey(x => x.Id);
|
||||
builder.Property(x => x.Id).ValueGeneratedNever();
|
||||
builder.Property(x => x.Name).HasMaxLength(256).IsRequired();
|
||||
builder.Property(x => x.Description).HasMaxLength(2000);
|
||||
builder.Property(x => x.Embedding).HasColumnType("real[]");
|
||||
|
||||
builder.HasIndex(x => x.Name).IsUnique();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user