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 ExerciseSetConfiguration : IEntityTypeConfiguration<ExerciseSet>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ExerciseSet> builder)
|
||||
{
|
||||
builder.ToTable("exercise_sets");
|
||||
builder.HasKey(x => x.Id);
|
||||
builder.Property(x => x.Id).ValueGeneratedNever();
|
||||
builder.Property(x => x.WeightKg).HasPrecision(8, 2);
|
||||
builder.Property(x => x.DistanceMeters).HasPrecision(10, 2);
|
||||
builder.Property(x => x.Notes).HasMaxLength(1000);
|
||||
|
||||
builder.HasIndex(x => new { x.WorkoutExerciseId, x.Order }).IsUnique();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user