Newer
Older
percord / extra / admin-api / Models / Spacebar.Models.Db / Models / Recipient.cs
@Rory& Rory& on 3 Feb 901 bytes Update C# db models
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace Spacebar.Models.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!;
}