This repository has been archived on 2026-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
2025-10-05 22:09:21 +02:00

36 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Spacebar.Db.Models;
[Table("streams")]
public partial class Stream
{
[Key]
[Column("id", TypeName = "character varying")]
public string Id { get; set; } = null!;
[Column("owner_id", TypeName = "character varying")]
public string OwnerId { get; set; } = null!;
[Column("channel_id", TypeName = "character varying")]
public string ChannelId { get; set; } = null!;
[Column("endpoint", TypeName = "character varying")]
public string Endpoint { get; set; } = null!;
[ForeignKey("ChannelId")]
[InverseProperty("Streams")]
public virtual Channel Channel { get; set; } = null!;
[ForeignKey("OwnerId")]
[InverseProperty("Streams")]
public virtual User Owner { get; set; } = null!;
[InverseProperty("Stream")]
public virtual ICollection<StreamSession> StreamSessions { get; set; } = new List<StreamSession>();
}