summary refs log tree commit diff
path: root/extra/admin-api/Spacebar.Db/Models/Attachment.cs
blob: 832f56de9918cfc28d04c5a1f134ec2613002acf (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
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace Spacebar.Db.Models;

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

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

    [Column("size")]
    public int Size { get; set; }

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

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

    [Column("height")]
    public int? Height { get; set; }

    [Column("width")]
    public int? Width { get; set; }

    [Column("content_type", TypeName = "character varying")]
    public string? ContentType { get; set; }

    [Column("message_id", TypeName = "character varying")]
    public string? MessageId { get; set; }

    [ForeignKey("MessageId")]
    [InverseProperty("Attachments")]
    public virtual Message? Message { get; set; }
}