22 lines
668 B
C#
22 lines
668 B
C#
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)
|
||
|
|
.HasDefaultValue("yolov8n");
|
||
|
|
|
||
|
|
builder.Property(p => p.MinConfidence)
|
||
|
|
.HasDefaultValue(0.4);
|
||
|
|
}
|
||
|
|
}
|