Changeset a569b7c for resTools_backend
- Timestamp:
- 08/24/22 16:27:48 (2 years ago)
- Branches:
- master
- Children:
- 63f5ced
- Parents:
- a26f6a1
- Location:
- resTools_backend/backend
- Files:
-
- 11 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
resTools_backend/backend/Data/DataContext.cs
ra26f6a1 ra569b7c 80 80 } 81 81 82 private DbSet<ToDoItem> toDoItems; 83 public DbSet<ToDoItem> ToDoItems 84 { 85 get 86 { 87 if (toDoItems == null) 88 { 89 toDoItems = Set<ToDoItem>(); 90 } 91 92 return toDoItems; 93 } 94 } 95 82 96 83 97 protected override void OnModelCreating(ModelBuilder modelBuilder) … … 131 145 modelBuilder.Entity<Review>() 132 146 .HasOne(p => p.User); 147 148 // 149 // ToDoItem 150 // 151 modelBuilder.Entity<ToDoItem>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd(); 152 modelBuilder.Entity<ToDoItem>() 153 .HasOne(p => p.LinkedReview); 133 154 } 134 155 } -
resTools_backend/backend/Migrations/DataContextModelSnapshot.cs
ra26f6a1 ra569b7c 168 168 }); 169 169 170 modelBuilder.Entity("backend.Entities.ToDoItem", b => 171 { 172 b.Property<int>("Id") 173 .ValueGeneratedOnAdd() 174 .HasColumnType("integer"); 175 176 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); 177 178 b.Property<DateTime>("CreatedAt") 179 .HasColumnType("timestamp with time zone"); 180 181 b.Property<string>("Description") 182 .IsRequired() 183 .HasColumnType("text"); 184 185 b.Property<int?>("LinkedReviewId") 186 .HasColumnType("integer"); 187 188 b.Property<int>("Priority") 189 .HasColumnType("integer"); 190 191 b.Property<int>("Status") 192 .HasColumnType("integer"); 193 194 b.Property<string>("Title") 195 .IsRequired() 196 .HasColumnType("text"); 197 198 b.HasKey("Id"); 199 200 b.HasIndex("LinkedReviewId"); 201 202 b.ToTable("ToDoItems"); 203 }); 204 170 205 modelBuilder.Entity("backend.Entities.User", b => 171 206 { … … 257 292 }); 258 293 294 modelBuilder.Entity("backend.Entities.ToDoItem", b => 295 { 296 b.HasOne("backend.Entities.Review", "LinkedReview") 297 .WithMany() 298 .HasForeignKey("LinkedReviewId"); 299 300 b.Navigation("LinkedReview"); 301 }); 302 259 303 modelBuilder.Entity("backend.Entities.Restaurant", b => 260 304 { -
resTools_backend/backend/Program.cs
ra26f6a1 ra569b7c 50 50 builder.Services.AddScoped<IReviewService, ReviewService>(); 51 51 builder.Services.AddScoped<ISmsService, SmsService>(); 52 builder.Services.AddScoped<IToDoService, ToDoService>(); 52 53 53 54 builder.Services.AddTransient<IEmailSender, EmailSender>();
Note:
See TracChangeset
for help on using the changeset viewer.