mirror of
https://github.com/spacebarchat/server.git
synced 2026-06-08 08:42:10 +00:00
Sync CS db model
This commit is contained in:
@@ -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!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user