From cd70f54266d708867a1eb35870bc755bc5b2df32 Mon Sep 17 00:00:00 2001 From: ivar Date: Wed, 3 Dec 2025 21:49:20 +0100 Subject: Refactor db --- api/WhatApi/Tables/Place.cs | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 api/WhatApi/Tables/Place.cs (limited to 'api/WhatApi/Tables/Place.cs') diff --git a/api/WhatApi/Tables/Place.cs b/api/WhatApi/Tables/Place.cs deleted file mode 100644 index 969007b..0000000 --- a/api/WhatApi/Tables/Place.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace WhatApi.Tables; - -public class Place : IAuditableEntity -{ - public Guid Id { get; set; } - public Guid ContentId { get; set; } - public Content Content { get; set; } = null!; - public required Point Location { get; set; } - public DateTimeOffset CreatedAtUtc { get; set; } - public DateTimeOffset? UpdatedAtUtc { get; set; } - public Guid CreatedBy { get; set; } - public Guid? UpdatedBy { get; set; } -} - -public class PlaceConfiguration : IEntityTypeConfiguration -{ - public void Configure(EntityTypeBuilder builder) { - builder.ToTable("place"); - builder.HasKey(x => x.Id); - builder.Property(x => x.Location).IsRequired(); - builder.HasOne(x => x.Content); - builder.Property(x => x.Location).HasColumnType($"geometry(point,{Constants.Wgs84SpatialReferenceId})"); - builder.HasIndex(x => x.Location).HasMethod("gist"); - } -} -- cgit v1.3