summaryrefslogtreecommitdiffstats
path: root/api/WhatApi/Tables
diff options
context:
space:
mode:
Diffstat (limited to 'api/WhatApi/Tables')
-rw-r--r--api/WhatApi/Tables/Place.cs2
-rw-r--r--api/WhatApi/Tables/User.cs6
2 files changed, 6 insertions, 2 deletions
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<Place>
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<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");
}