AltHeroes Bot v2
1// <auto-generated />
2using System;
3using AltBot.Core.Models;
4using AltBot.Data;
5using Microsoft.EntityFrameworkCore;
6using Microsoft.EntityFrameworkCore.Infrastructure;
7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
9
10#nullable disable
11
12namespace AltBot.Data.Migrations
13{
14 [DbContext(typeof(DataContext))]
15 partial class DataContextModelSnapshot : ModelSnapshot
16 {
17 protected override void BuildModel(ModelBuilder modelBuilder)
18 {
19#pragma warning disable 612, 618
20 modelBuilder
21 .HasAnnotation("ProductVersion", "9.0.10")
22 .HasAnnotation("Relational:MaxIdentifierLength", 63);
23
24 NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "label", new[] { "bronze", "gold", "hero", "none", "silver" });
25 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
26
27 modelBuilder.Entity("AltBot.Core.Models.ImagePost", b =>
28 {
29 b.Property<string>("Did")
30 .HasMaxLength(2048)
31 .HasColumnType("character varying(2048)")
32 .HasColumnName("did");
33
34 b.Property<string>("Cid")
35 .HasMaxLength(1000)
36 .HasColumnType("character varying(1000)")
37 .HasColumnName("cid");
38
39 b.Property<string>("Rkey")
40 .HasMaxLength(512)
41 .HasColumnType("character varying(512)")
42 .HasColumnName("rkey");
43
44 b.Property<DateTime>("SeenAt")
45 .HasColumnType("timestamp with time zone")
46 .HasColumnName("seen_at");
47
48 b.Property<bool>("ValidAlt")
49 .HasColumnType("boolean")
50 .HasColumnName("valid_alt");
51
52 b.HasKey("Did", "Cid")
53 .HasName("pk_image_post");
54
55 b.ToTable("image_post", (string)null);
56 });
57
58 modelBuilder.Entity("AltBot.Core.Models.Subscriber", b =>
59 {
60 b.Property<string>("Did")
61 .HasMaxLength(2048)
62 .HasColumnType("character varying(2048)")
63 .HasColumnName("did");
64
65 b.Property<bool>("Active")
66 .ValueGeneratedOnAdd()
67 .HasColumnType("boolean")
68 .HasDefaultValue(true)
69 .HasColumnName("active");
70
71 b.Property<string>("Handle")
72 .HasMaxLength(250)
73 .IsUnicode(true)
74 .HasColumnType("character varying(250)")
75 .HasColumnName("handle");
76
77 b.Property<LabelLevel>("Label")
78 .HasColumnType("label")
79 .HasColumnName("label");
80
81 b.Property<string>("Rkey")
82 .HasMaxLength(100)
83 .HasColumnType("character varying(100)")
84 .HasColumnName("rkey");
85
86 b.Property<DateTime>("SeenAt")
87 .HasColumnType("timestamp with time zone")
88 .HasColumnName("seen_at");
89
90 b.HasKey("Did")
91 .HasName("pk_subscriber");
92
93 b.ToTable("subscriber", (string)null);
94 });
95
96 modelBuilder.Entity("AltBot.Core.Models.SubscriberHistory", b =>
97 {
98 b.Property<string>("Did")
99 .HasMaxLength(2048)
100 .HasColumnType("character varying(2048)")
101 .HasColumnName("did");
102
103 b.Property<DateTime>("OccurredAt")
104 .HasColumnType("timestamp with time zone")
105 .HasColumnName("occurred_at");
106
107 b.Property<string>("Action")
108 .IsRequired()
109 .HasColumnType("text")
110 .HasColumnName("action");
111
112 b.Property<string>("Category")
113 .IsRequired()
114 .HasMaxLength(2048)
115 .HasColumnType("character varying(2048)")
116 .HasColumnName("category");
117
118 b.HasKey("Did", "OccurredAt")
119 .HasName("pk_subscriber_history");
120
121 b.ToTable("subscriber_history", (string)null);
122 });
123
124 modelBuilder.Entity("AltBot.Core.Models.ImagePost", b =>
125 {
126 b.HasOne("AltBot.Core.Models.Subscriber", "Subscriber")
127 .WithMany("Posts")
128 .HasForeignKey("Did")
129 .OnDelete(DeleteBehavior.Cascade)
130 .IsRequired()
131 .HasConstraintName("fk_image_post_subscriber");
132
133 b.Navigation("Subscriber");
134 });
135
136 modelBuilder.Entity("AltBot.Core.Models.SubscriberHistory", b =>
137 {
138 b.HasOne("AltBot.Core.Models.Subscriber", "Subscriber")
139 .WithMany("History")
140 .HasForeignKey("Did")
141 .OnDelete(DeleteBehavior.Cascade)
142 .IsRequired()
143 .HasConstraintName("fk_subscriber_history_subscriber");
144
145 b.Navigation("Subscriber");
146 });
147
148 modelBuilder.Entity("AltBot.Core.Models.Subscriber", b =>
149 {
150 b.Navigation("History");
151
152 b.Navigation("Posts");
153 });
154#pragma warning restore 612, 618
155 }
156 }
157}