summaryrefslogtreecommitdiffstats
path: root/api/WhatApi/Tables/User.cs
diff options
context:
space:
mode:
authorivar <i@oiee.no>2025-12-02 22:38:23 +0100
committerivar <i@oiee.no>2025-12-02 22:38:23 +0100
commit68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec (patch)
treeefab90e59deae00953704059efdec14cb3ad81c7 /api/WhatApi/Tables/User.cs
parentd2089c0038460504869b27203143e40441a86eff (diff)
downloadwhat-68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec.tar.xz
what-68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec.zip
Move off razor pages
Diffstat (limited to 'api/WhatApi/Tables/User.cs')
-rw-r--r--api/WhatApi/Tables/User.cs6
1 files changed, 5 insertions, 1 deletions
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<Place> Places { get; set; } = null!;
@@ -16,11 +20,11 @@ public class User : IAuditableEntity
public class UserConfiguration : IEntityTypeConfiguration<User>
{
-
public void Configure(EntityTypeBuilder<User> 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");
}