summaryrefslogtreecommitdiff
path: root/backend/Elements.Data/Migrations/ApplicationDbContextModelSnapshot.cs
blob: 095839f78396510c728d459336457af3bb1f9dfa (plain)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
// <auto-generated />
using System;
using Elements.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace Elements.Data.Migrations
{
    [DbContext(typeof(ApplicationDbContext))]
    partial class ApplicationDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder.HasAnnotation("ProductVersion", "7.0.12");

            modelBuilder.Entity("Elements.Data.Models.Element", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<byte[]>("IconPng")
                        .IsRequired()
                        .HasColumnType("BLOB");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("State")
                        .HasColumnType("INTEGER");

                    b.Property<int>("UserId")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("Elements");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            IconPng = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243, 255, 97, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 0, 29, 73, 68, 65, 84, 120, 156, 99, 249, 95, 224, 252, 159, 129, 2, 192, 194, 64, 33, 24, 53, 96, 212, 128, 81, 3, 6, 139, 1, 0, 119, 65, 2, 242, 233, 108, 215, 141, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 },
                            Name = "Fire",
                            State = 1,
                            UserId = 1
                        },
                        new
                        {
                            Id = 2,
                            IconPng = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243, 255, 97, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 0, 29, 73, 68, 65, 84, 120, 156, 99, 81, 156, 246, 249, 63, 3, 5, 128, 133, 129, 66, 48, 106, 192, 168, 1, 163, 6, 12, 22, 3, 0, 85, 67, 2, 234, 36, 203, 134, 16, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 },
                            Name = "Water",
                            State = 1,
                            UserId = 1
                        },
                        new
                        {
                            Id = 3,
                            IconPng = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243, 255, 97, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 0, 30, 73, 68, 65, 84, 120, 156, 99, 217, 125, 239, 247, 127, 6, 10, 0, 11, 3, 133, 96, 212, 128, 81, 3, 70, 13, 24, 44, 6, 0, 0, 10, 221, 3, 212, 197, 89, 182, 174, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 },
                            Name = "Air",
                            State = 1,
                            UserId = 1
                        },
                        new
                        {
                            Id = 4,
                            IconPng = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243, 255, 97, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 0, 29, 73, 68, 65, 84, 120, 156, 99, 137, 117, 48, 255, 207, 64, 1, 96, 97, 160, 16, 140, 26, 48, 106, 192, 168, 1, 131, 197, 0, 0, 242, 75, 2, 20, 1, 55, 196, 168, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 },
                            Name = "Ground",
                            State = 1,
                            UserId = 1
                        });
                });

            modelBuilder.Entity("Elements.Data.Models.Recipe", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<int>("FirstIngredientId")
                        .HasColumnType("INTEGER");

                    b.Property<int>("ResultId")
                        .HasColumnType("INTEGER");

                    b.Property<int>("SecondIngredientId")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.HasIndex("FirstIngredientId");

                    b.HasIndex("ResultId");

                    b.HasIndex("SecondIngredientId");

                    b.ToTable("Recipes");
                });

            modelBuilder.Entity("Elements.Data.Models.Suggestion", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<int>("FirstIngredientId")
                        .HasColumnType("INTEGER");

                    b.Property<byte[]>("Icon")
                        .IsRequired()
                        .HasColumnType("BLOB");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("SecondIngredientId")
                        .HasColumnType("INTEGER");

                    b.Property<int>("UserId")
                        .HasColumnType("INTEGER");

                    b.Property<int>("Votes")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("VotingEnd")
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.HasIndex("FirstIngredientId");

                    b.HasIndex("SecondIngredientId");

                    b.HasIndex("UserId");

                    b.ToTable("Suggestions");
                });

            modelBuilder.Entity("Elements.Data.Models.User", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<string>("GoogleId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("Users");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            GoogleId = "",
                            Name = "Elements"
                        });
                });

            modelBuilder.Entity("Elements.Data.Models.Element", b =>
                {
                    b.HasOne("Elements.Data.Models.User", "User")
                        .WithMany("Elements")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Elements.Data.Models.Recipe", b =>
                {
                    b.HasOne("Elements.Data.Models.Element", "FirstIngredient")
                        .WithMany()
                        .HasForeignKey("FirstIngredientId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Elements.Data.Models.Element", "Result")
                        .WithMany()
                        .HasForeignKey("ResultId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Elements.Data.Models.Element", "SecondIngredient")
                        .WithMany()
                        .HasForeignKey("SecondIngredientId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("FirstIngredient");

                    b.Navigation("Result");

                    b.Navigation("SecondIngredient");
                });

            modelBuilder.Entity("Elements.Data.Models.Suggestion", b =>
                {
                    b.HasOne("Elements.Data.Models.Element", "FirstIngredient")
                        .WithMany()
                        .HasForeignKey("FirstIngredientId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Elements.Data.Models.Element", "SecondIngredient")
                        .WithMany()
                        .HasForeignKey("SecondIngredientId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Elements.Data.Models.User", null)
                        .WithMany("Suggestions")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("FirstIngredient");

                    b.Navigation("SecondIngredient");
                });

            modelBuilder.Entity("Elements.Data.Models.User", b =>
                {
                    b.Navigation("Elements");

                    b.Navigation("Suggestions");
                });
#pragma warning restore 612, 618
        }
    }
}