blob: 55bfb9d2682cdd18c5ab86ca7666e9299deeb000 (
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
|
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; }
}
|