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 21:33:50 +02:00

34 lines
987 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Spacebar.Db.Models;
[Table("notes")]
[Index("OwnerId", "TargetId", Name = "UQ_74e6689b9568cc965b8bfc9150b", IsUnique = true)]
public partial class Note
{
[Key]
[Column("id", TypeName = "character varying")]
public string Id { get; set; } = null!;
[Column("content", TypeName = "character varying")]
public string Content { get; set; } = null!;
[Column("owner_id", TypeName = "character varying")]
public string? OwnerId { get; set; }
[Column("target_id", TypeName = "character varying")]
public string? TargetId { get; set; }
[ForeignKey("OwnerId")]
[InverseProperty("NoteOwners")]
public virtual User? Owner { get; set; }
[ForeignKey("TargetId")]
[InverseProperty("NoteTargets")]
public virtual User? Target { get; set; }
}