summary refs log tree commit diff
path: root/extra/admin-api/Spacebar.Db/Models/Recipient.cs
blob: d89c47d7567f6fe75cda0214726a0dfc25d6e412 (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
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace Spacebar.Db.Models;

[Table("recipients")]
public partial class Recipient
{
    [Key]
    [Column("id", TypeName = "character varying")]
    public string Id { get; set; } = null!;

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

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

    [Column("closed")]
    public bool Closed { get; set; }

    [ForeignKey("ChannelId")]
    [InverseProperty("Recipients")]
    public virtual Channel Channel { get; set; } = null!;

    [ForeignKey("UserId")]
    [InverseProperty("Recipients")]
    public virtual User User { get; set; } = null!;
}