summary refs log tree commit diff
path: root/extra/admin-api/Spacebar.Db/Models/CloudAttachment.cs
blob: e7f05e9479858cee32271fc0c5d3aa6051a45072 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace Spacebar.Db.Models;

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

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

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

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

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

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

    [Column("user_file_size")]
    public int? UserFileSize { get; set; }

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

    [Column("user_is_clip")]
    public bool? UserIsClip { get; set; }

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

    [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; }

    [ForeignKey("ChannelId")]
    [InverseProperty("CloudAttachments")]
    public virtual Channel? Channel { get; set; }

    [ForeignKey("UserId")]
    [InverseProperty("CloudAttachments")]
    public virtual User? User { get; set; }
}