summaryrefslogtreecommitdiffstats
path: root/api/WhatApi/Tables/User.cs
diff options
context:
space:
mode:
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");
}