From 68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec Mon Sep 17 00:00:00 2001 From: ivar Date: Tue, 2 Dec 2025 22:38:23 +0100 Subject: Move off razor pages --- api/WhatApi/Tables/Place.cs | 2 +- api/WhatApi/Tables/User.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'api/WhatApi/Tables') diff --git a/api/WhatApi/Tables/Place.cs b/api/WhatApi/Tables/Place.cs index abbd71a..969007b 100644 --- a/api/WhatApi/Tables/Place.cs +++ b/api/WhatApi/Tables/Place.cs @@ -22,4 +22,4 @@ public class PlaceConfiguration : IEntityTypeConfiguration builder.Property(x => x.Location).HasColumnType($"geometry(point,{Constants.Wgs84SpatialReferenceId})"); builder.HasIndex(x => x.Location).HasMethod("gist"); } -} \ No newline at end of file +} diff --git a/api/WhatApi/Tables/User.cs b/api/WhatApi/Tables/User.cs index 5c068b2..9044439 100644 --- a/api/WhatApi/Tables/User.cs +++ b/api/WhatApi/Tables/User.cs @@ -1,3 +1,5 @@ +using WhatApi.Extras; + namespace WhatApi.Tables; public class User : IAuditableEntity @@ -5,6 +7,8 @@ public class User : IAuditableEntity public Guid Id { get; set; } public required string Name { get; set; } public required string Email { get; set; } + + [AuditTrailIgnore] public required string Password { get; set; } public DateTimeOffset? LastSeen { get; set; } public IEnumerable Places { get; set; } = null!; @@ -16,11 +20,11 @@ public class User : IAuditableEntity public class UserConfiguration : IEntityTypeConfiguration { - public void Configure(EntityTypeBuilder builder) { builder.HasKey(x => x.Id); builder.Property(x => x.Name).HasMaxLength(50); builder.Property(x => x.Email).HasMaxLength(100); + builder.Property(x => x.Password).HasMaxLength(100); builder.HasMany(x => x.Places); builder.ToTable("user"); } -- cgit v1.3