diff options
| author | ivar <i@oiee.no> | 2025-12-03 21:49:20 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-12-03 21:49:20 +0100 |
| commit | cd70f54266d708867a1eb35870bc755bc5b2df32 (patch) | |
| tree | f0a8ec571ef3f345ac74293b4cb11918878b3ed5 /api/WhatApi/Tables/User.cs | |
| parent | 5bd9ad8bd1740dcff179d66718532086304ca4c4 (diff) | |
| download | what-cd70f54266d708867a1eb35870bc755bc5b2df32.tar.xz what-cd70f54266d708867a1eb35870bc755bc5b2df32.zip | |
Refactor db
Diffstat (limited to 'api/WhatApi/Tables/User.cs')
| -rw-r--r-- | api/WhatApi/Tables/User.cs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/api/WhatApi/Tables/User.cs b/api/WhatApi/Tables/User.cs deleted file mode 100644 index 9044439..0000000 --- a/api/WhatApi/Tables/User.cs +++ /dev/null @@ -1,31 +0,0 @@ -using WhatApi.Extras; - -namespace WhatApi.Tables; - -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!; - public DateTimeOffset CreatedAtUtc { get; set; } - public DateTimeOffset? UpdatedAtUtc { get; set; } - public Guid CreatedBy { get; set; } - public Guid? UpdatedBy { get; set; } -} - -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"); - } -}
\ No newline at end of file |
