Sync CS db model

This commit is contained in:
Rory&
2026-01-11 16:39:22 +01:00
parent 49bb15051a
commit 989bb734cd
5 changed files with 43 additions and 16 deletions
@@ -94,6 +94,9 @@ public partial class Message
[Column("interaction_metadata")]
public string? InteractionMetadata { get; set; }
[Column("message_snapshots")]
public string MessageSnapshots { get; set; } = null!;
[ForeignKey("ApplicationId")]
[InverseProperty("Messages")]
public virtual Application? Application { get; set; }
+25 -6
View File
@@ -7,15 +7,13 @@ using Microsoft.EntityFrameworkCore;
namespace Spacebar.Db.Models;
[Table("sessions")]
[Index("UserId", Name = "IDX_085d540d9f418cfbdc7bd55bb1")]
public partial class Session
{
[Key]
[Column("id", TypeName = "character varying")]
public string Id { get; set; } = null!;
[Column("user_id", TypeName = "character varying")]
public string? UserId { get; set; }
public string UserId { get; set; } = null!;
[Key]
[Column("session_id", TypeName = "character varying")]
public string SessionId { get; set; } = null!;
@@ -31,7 +29,28 @@ public partial class Session
[Column("client_status")]
public string ClientStatus { get; set; } = null!;
[Column("is_admin_session")]
public bool IsAdminSession { get; set; }
[Column("created_at", TypeName = "timestamp without time zone")]
public DateTime CreatedAt { get; set; }
[Column("last_seen", TypeName = "timestamp without time zone")]
public DateTime? LastSeen { get; set; }
[Column("last_seen_ip", TypeName = "character varying")]
public string? LastSeenIp { get; set; }
[Column("last_seen_location", TypeName = "character varying")]
public string? LastSeenLocation { get; set; }
[Column("last_seen_location_info")]
public string? LastSeenLocationInfo { get; set; }
[Column("session_nickname", TypeName = "character varying")]
public string? SessionNickname { get; set; }
[ForeignKey("UserId")]
[InverseProperty("Sessions")]
public virtual User? User { get; set; }
public virtual User User { get; set; } = null!;
}
+2 -5
View File
@@ -89,14 +89,14 @@ public partial class User
[Column("email", TypeName = "character varying")]
public string? Email { get; set; }
[Column("flags")]
[Column("flags", TypeName = "character varying")]
public ulong Flags { get; set; }
[Column("public_flags")]
public ulong PublicFlags { get; set; }
[Column("purchased_flags")]
public ulong PurchasedFlags { get; set; }
public long PurchasedFlags { get; set; }
[Column("premium_usage_flags")]
public int PremiumUsageFlags { get; set; }
@@ -110,9 +110,6 @@ public partial class User
[Column("fingerprints")]
public string Fingerprints { get; set; } = null!;
[Column("extended_settings")]
public string ExtendedSettings { get; set; } = null!;
[Column("settingsIndex")]
public int? SettingsIndex { get; set; }