22 lines
783 B
C#
22 lines
783 B
C#
using BlueLaminate.EFCore.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace BlueLaminate.EFCore.Configurations;
|
|
|
|
public class SkinConditionConfiguration : IEntityTypeConfiguration<SkinCondition>
|
|
{
|
|
public void Configure(EntityTypeBuilder<SkinCondition> entity)
|
|
{
|
|
entity.Property(e => e.FloatMin).HasColumnType("numeric(10,9)");
|
|
entity.Property(e => e.FloatMax).HasColumnType("numeric(10,9)");
|
|
|
|
// Per-site "last swept" checkpoints live in skin_condition_sweeps (one row per
|
|
// site); see SkinConditionSweepConfiguration for the indexes that order them.
|
|
|
|
entity.HasOne(e => e.Skin)
|
|
.WithMany(s => s.Conditions)
|
|
.HasForeignKey(e => e.SkinId);
|
|
}
|
|
}
|