diff options
| author | ivar <i@oiee.no> | 2025-12-02 22:38:23 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-12-02 22:38:23 +0100 |
| commit | 68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec (patch) | |
| tree | efab90e59deae00953704059efdec14cb3ad81c7 /api/WhatApi/Tables | |
| parent | d2089c0038460504869b27203143e40441a86eff (diff) | |
| download | what-68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec.tar.xz what-68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec.zip | |
Move off razor pages
Diffstat (limited to 'api/WhatApi/Tables')
| -rw-r--r-- | api/WhatApi/Tables/Place.cs | 2 | ||||
| -rw-r--r-- | api/WhatApi/Tables/User.cs | 6 |
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"); } |
