- Timestamp:
- 07/10/22 10:27:45 (2 years ago)
- Branches:
- master
- Children:
- a26f6a1
- Parents:
- cc4db18
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resTools_backend/backend/Migrations/DataContextModelSnapshot.cs
rcc4db18 r899b19d 131 131 }); 132 132 133 modelBuilder.Entity("backend.Entities.Review", b => 134 { 135 b.Property<int>("Id") 136 .ValueGeneratedOnAdd() 137 .HasColumnType("integer"); 138 139 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); 140 141 b.Property<DateTime>("CreatedAt") 142 .HasColumnType("timestamp with time zone"); 143 144 b.Property<string>("Description") 145 .IsRequired() 146 .HasColumnType("text"); 147 148 b.Property<int>("RestaurantId") 149 .HasColumnType("integer"); 150 151 b.Property<int>("Stars") 152 .HasColumnType("integer"); 153 154 b.Property<string>("Title") 155 .IsRequired() 156 .HasColumnType("text"); 157 158 b.Property<int>("UserId") 159 .HasColumnType("integer"); 160 161 b.HasKey("Id"); 162 163 b.HasIndex("RestaurantId"); 164 165 b.HasIndex("UserId"); 166 167 b.ToTable("Reviews"); 168 }); 169 133 170 modelBuilder.Entity("backend.Entities.User", b => 134 171 { … … 142 179 .IsRequired() 143 180 .HasColumnType("text"); 181 182 b.Property<bool>("IsAdmin") 183 .HasColumnType("boolean"); 144 184 145 185 b.Property<string>("Password") … … 183 223 }); 184 224 225 modelBuilder.Entity("backend.Entities.Review", b => 226 { 227 b.HasOne("backend.Entities.Restaurant", "Restaurant") 228 .WithMany("Reviews") 229 .HasForeignKey("RestaurantId") 230 .OnDelete(DeleteBehavior.Cascade) 231 .IsRequired(); 232 233 b.HasOne("backend.Entities.User", "User") 234 .WithMany() 235 .HasForeignKey("UserId") 236 .OnDelete(DeleteBehavior.Cascade) 237 .IsRequired(); 238 239 b.Navigation("Restaurant"); 240 241 b.Navigation("User"); 242 }); 243 185 244 modelBuilder.Entity("backend.Entities.Restaurant", b => 186 245 { … … 188 247 189 248 b.Navigation("Reservations"); 249 250 b.Navigation("Reviews"); 190 251 }); 191 252
Note:
See TracChangeset
for help on using the changeset viewer.