Added IsUnicode(false) to hostname, version, status, IP, hash, prefix, key, URL, timezone, theme, language, YOLO model name, and enum-based string columns. These columns only contain ASCII data — disabling Unicode improves PostgreSQL index efficiency and reduces storage. Excluded natural text columns (Address, DisplayName, Site.Name) that may contain Unicode characters like accented letters.
24 lines
698 B
C#
24 lines
698 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")
|
|
.IsUnicode(false);
|
|
|
|
builder.Property(p => p.MinConfidence)
|
|
.HasDefaultValue(0.4);
|
|
}
|
|
}
|