summary refs log tree commit diff
path: root/extra/admin-api/Spacebar.Db/Models/Session.cs
blob: 0a342ad87942964731a1fe64010c69d95dc93df1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace Spacebar.Db.Models;

[Table("sessions")]
[Index("UserId", Name = "IDX_085d540d9f418cfbdc7bd55bb1")]
public partial class Session
{
    [Column("user_id", TypeName = "character varying")]
    public string UserId { get; set; } = null!;

    [Key]
    [Column("session_id", TypeName = "character varying")]
    public string SessionId { get; set; } = null!;

    [Column("activities")]
    public string Activities { get; set; } = null!;

    [Column("client_info")]
    public string ClientInfo { get; set; } = null!;

    [Column("status", TypeName = "character varying")]
    public string Status { get; set; } = null!;

    [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; } = null!;
}