Added new modules and updated existing logic

This commit is contained in:
Dieter Neumann
2026-02-24 13:32:01 +01:00
parent 2a4b4ed5fe
commit ad734273ce
694 changed files with 27935 additions and 610 deletions

View File

@@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations;
namespace HotlinePlanner.Models
{
public class EventLog
{
public int Id { get; set; }
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
[Required]
public string Level { get; set; } = "Info"; // Info, Warning, Error
[Required]
public string Category { get; set; } = string.Empty; // Auth, BackgroundWorker, UserAction
[Required]
public string Message { get; set; } = string.Empty;
public string? Tenant { get; set; }
public string? UserId { get; set; }
public string? Payload { get; set; } // JSON or extra details
}
}

View File

@@ -0,0 +1,31 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace HotlinePlanner.Models
{
[Table("Tokens_v2")]
public class Token
{
public int Id { get; set; }
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
[Required]
public string Tenant { get; set; } = string.Empty;
[Required]
public string UserId { get; set; } = string.Empty;
public string? UserEmail { get; set; }
[Required]
public string Provider { get; set; } = string.Empty;
[Required]
public string EncryptedToken { get; set; } = string.Empty;
public DateTime LastUpdated { get; set; } = DateTime.UtcNow;
public bool Enabled { get; set; } = true;
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace HotlinePlanner.Models
{
[Table("UserProfiles")]
public class UserProfile
{
[Key]
public string UserId { get; set; } = string.Empty;
public string? UserEmail { get; set; }
public string? PictureBase64 { get; set; }
public DateTime LastUpdated { get; set; }
}
}