2026-07-16 20:53:56 +00:00
|
|
|
using Heimdall.Domain.Entities;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
|
|
|
|
|
|
namespace Heimdall.Infrastructure.Data.Configurations;
|
|
|
|
|
|
|
|
|
|
public class CameraDetectionProfileConfiguration : IEntityTypeConfiguration<CameraDetectionProfile>
|
|
|
|
|
{
|
|
|
|
|
public void Configure(EntityTypeBuilder<CameraDetectionProfile> builder)
|
|
|
|
|
{
|
|
|
|
|
builder.ToTable("camera_detection_profiles");
|
|
|
|
|
|
|
|
|
|
builder.HasKey(p => p.CameraId);
|
|
|
|
|
|
|
|
|
|
builder.Property(p => p.YoloModel)
|
|
|
|
|
.HasMaxLength(50)
|
2026-07-17 19:31:11 +00:00
|
|
|
.HasDefaultValue("yolov8n")
|
|
|
|
|
.IsUnicode(false);
|
2026-07-16 20:53:56 +00:00
|
|
|
|
|
|
|
|
builder.Property(p => p.MinConfidence)
|
|
|
|
|
.HasDefaultValue(0.4);
|
|
|
|
|
}
|
|
|
|
|
}
|