source: resTools_backend/backend/Migrations/20220705164500_Restaurant-Fields.Designer.cs@ 13f1472

Last change on this file since 13f1472 was cc4db18, checked in by Danilo <danilo.najkov@…>, 2 years ago

reservation module changes + contact module + menu module

  • Property mode set to 100644
File size: 5.3 KB
Line 
1// <auto-generated />
2using System;
3using Microsoft.EntityFrameworkCore;
4using Microsoft.EntityFrameworkCore.Infrastructure;
5using Microsoft.EntityFrameworkCore.Migrations;
6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
7using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
8using backend.Data;
9
10#nullable disable
11
12namespace backend.Migrations
13{
14 [DbContext(typeof(DataContext))]
15 [Migration("20220705164500_Restaurant-Fields")]
16 partial class RestaurantFields
17 {
18 protected override void BuildTargetModel(ModelBuilder modelBuilder)
19 {
20#pragma warning disable 612, 618
21 modelBuilder
22 .HasAnnotation("ProductVersion", "6.0.3")
23 .HasAnnotation("Relational:MaxIdentifierLength", 63);
24
25 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
26
27 modelBuilder.Entity("backend.Entities.Reservation", b =>
28 {
29 b.Property<int>("Id")
30 .ValueGeneratedOnAdd()
31 .HasColumnType("integer");
32
33 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
34
35 b.Property<string>("ContactName")
36 .IsRequired()
37 .HasColumnType("text");
38
39 b.Property<string>("ContactNumber")
40 .IsRequired()
41 .HasColumnType("text");
42
43 b.Property<int>("Persons")
44 .HasColumnType("integer");
45
46 b.Property<int>("ReservationPlace")
47 .HasColumnType("integer");
48
49 b.Property<int>("ReservationStatus")
50 .HasColumnType("integer");
51
52 b.Property<int>("ReservationType")
53 .HasColumnType("integer");
54
55 b.Property<int>("RestaurantId")
56 .HasColumnType("integer");
57
58 b.Property<DateTime>("StartDate")
59 .HasColumnType("timestamp with time zone");
60
61 b.Property<int>("Table")
62 .HasColumnType("integer");
63
64 b.HasKey("Id");
65
66 b.HasIndex("RestaurantId");
67
68 b.ToTable("Reservations");
69 });
70
71 modelBuilder.Entity("backend.Entities.Restaurant", b =>
72 {
73 b.Property<int>("Id")
74 .ValueGeneratedOnAdd()
75 .HasColumnType("integer");
76
77 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
78
79 b.Property<string>("Address")
80 .IsRequired()
81 .HasColumnType("text");
82
83 b.Property<byte[]>("Image")
84 .IsRequired()
85 .HasColumnType("bytea");
86
87 b.Property<string>("Name")
88 .IsRequired()
89 .HasColumnType("text");
90
91 b.Property<int?>("OwnerFk")
92 .HasColumnType("integer");
93
94 b.Property<string>("Phone")
95 .IsRequired()
96 .HasColumnType("text");
97
98 b.HasKey("Id");
99
100 b.HasIndex("OwnerFk")
101 .IsUnique();
102
103 b.ToTable("Restoraunts");
104 });
105
106 modelBuilder.Entity("backend.Entities.User", b =>
107 {
108 b.Property<int>("Id")
109 .ValueGeneratedOnAdd()
110 .HasColumnType("integer");
111
112 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
113
114 b.Property<string>("Email")
115 .IsRequired()
116 .HasColumnType("text");
117
118 b.Property<string>("Password")
119 .IsRequired()
120 .HasColumnType("text");
121
122 b.HasKey("Id");
123
124 b.ToTable("Users");
125 });
126
127 modelBuilder.Entity("backend.Entities.Reservation", b =>
128 {
129 b.HasOne("backend.Entities.Restaurant", "Restaurant")
130 .WithMany("Reservations")
131 .HasForeignKey("RestaurantId")
132 .OnDelete(DeleteBehavior.Cascade)
133 .IsRequired();
134
135 b.Navigation("Restaurant");
136 });
137
138 modelBuilder.Entity("backend.Entities.Restaurant", b =>
139 {
140 b.HasOne("backend.Entities.User", "Owner")
141 .WithOne("Restaurant")
142 .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
143
144 b.Navigation("Owner");
145 });
146
147 modelBuilder.Entity("backend.Entities.Restaurant", b =>
148 {
149 b.Navigation("Reservations");
150 });
151
152 modelBuilder.Entity("backend.Entities.User", b =>
153 {
154 b.Navigation("Restaurant")
155 .IsRequired();
156 });
157#pragma warning restore 612, 618
158 }
159 }
160}
Note: See TracBrowser for help on using the repository browser.