source: resTools_backend/backend/Migrations/20220411110455_Change-Propname.Designer.cs

Last change on this file was 7a983b0, checked in by Danilo <danilo.najkov@…>, 3 years ago

move files

  • Property mode set to 100644
File size: 4.7 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("20220411110455_Change-Propname")]
16 partial class ChangePropname
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>("ReservationPlace")
44 .HasColumnType("integer");
45
46 b.Property<int>("ReservationStatus")
47 .HasColumnType("integer");
48
49 b.Property<int>("ReservationType")
50 .HasColumnType("integer");
51
52 b.Property<int>("RestaurantId")
53 .HasColumnType("integer");
54
55 b.Property<DateTime>("StartDate")
56 .HasColumnType("timestamp with time zone");
57
58 b.HasKey("Id");
59
60 b.HasIndex("RestaurantId");
61
62 b.ToTable("Reservations");
63 });
64
65 modelBuilder.Entity("backend.Entities.Restaurant", b =>
66 {
67 b.Property<int>("Id")
68 .ValueGeneratedOnAdd()
69 .HasColumnType("integer");
70
71 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
72
73 b.Property<string>("Name")
74 .IsRequired()
75 .HasColumnType("text");
76
77 b.Property<int?>("OwnerFk")
78 .HasColumnType("integer");
79
80 b.HasKey("Id");
81
82 b.HasIndex("OwnerFk")
83 .IsUnique();
84
85 b.ToTable("Restoraunts");
86 });
87
88 modelBuilder.Entity("backend.Entities.User", b =>
89 {
90 b.Property<int>("Id")
91 .ValueGeneratedOnAdd()
92 .HasColumnType("integer");
93
94 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
95
96 b.Property<string>("Email")
97 .IsRequired()
98 .HasColumnType("text");
99
100 b.Property<string>("Password")
101 .IsRequired()
102 .HasColumnType("text");
103
104 b.HasKey("Id");
105
106 b.ToTable("Users");
107 });
108
109 modelBuilder.Entity("backend.Entities.Reservation", b =>
110 {
111 b.HasOne("backend.Entities.Restaurant", "Restaurant")
112 .WithMany("Reservations")
113 .HasForeignKey("RestaurantId")
114 .OnDelete(DeleteBehavior.Cascade)
115 .IsRequired();
116
117 b.Navigation("Restaurant");
118 });
119
120 modelBuilder.Entity("backend.Entities.Restaurant", b =>
121 {
122 b.HasOne("backend.Entities.User", "Owner")
123 .WithOne("Restaurant")
124 .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
125
126 b.Navigation("Owner");
127 });
128
129 modelBuilder.Entity("backend.Entities.Restaurant", b =>
130 {
131 b.Navigation("Reservations");
132 });
133
134 modelBuilder.Entity("backend.Entities.User", b =>
135 {
136 b.Navigation("Restaurant")
137 .IsRequired();
138 });
139#pragma warning restore 612, 618
140 }
141 }
142}
Note: See TracBrowser for help on using the repository browser.