From c82ed0ccfa05ea7dc22ce81c7a2bc2b41b096109 Mon Sep 17 00:00:00 2001 From: romandykyi Date: Fri, 9 Feb 2024 20:30:08 +0100 Subject: [PATCH] Add models for basic to-do list management --- AdvancedTodoList.Core/Models/TodoItem.cs | 16 - AdvancedTodoList.Core/Models/TodoList.cs | 15 - .../Models/TodoLists/TodoItem.cs | 73 ++++ .../Models/TodoLists/TodoList.cs | 42 +++ .../Services/ITodoListsService.cs | 2 +- .../Data/ApplicationDbContext.cs | 2 + .../20240209192939_BasicTodoList.Designer.cs | 351 ++++++++++++++++++ .../20240209192939_BasicTodoList.cs | 98 +++++ .../ApplicationDbContextModelSnapshot.cs | 38 +- .../Services/TodoListsService.cs | 2 +- .../Services/TodoListServiceTests.cs | 2 +- .../Tests/TodoListsEndpointsTests.cs | 4 +- 12 files changed, 602 insertions(+), 43 deletions(-) delete mode 100644 AdvancedTodoList.Core/Models/TodoItem.cs delete mode 100644 AdvancedTodoList.Core/Models/TodoList.cs create mode 100644 AdvancedTodoList.Core/Models/TodoLists/TodoItem.cs create mode 100644 AdvancedTodoList.Core/Models/TodoLists/TodoList.cs create mode 100644 AdvancedTodoList.Infrastructure/Migrations/20240209192939_BasicTodoList.Designer.cs create mode 100644 AdvancedTodoList.Infrastructure/Migrations/20240209192939_BasicTodoList.cs diff --git a/AdvancedTodoList.Core/Models/TodoItem.cs b/AdvancedTodoList.Core/Models/TodoItem.cs deleted file mode 100644 index dae91c3..0000000 --- a/AdvancedTodoList.Core/Models/TodoItem.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace AdvancedTodoList.Core.Models; - -public class TodoItem -{ - [Key] - public int Id { get; set; } - public string Name { get; set; } = null!; - - [ForeignKey(nameof(TodoList))] - public string TodoListId { get; set; } = null!; - - public TodoList TodoList { get; set; } = null!; -} diff --git a/AdvancedTodoList.Core/Models/TodoList.cs b/AdvancedTodoList.Core/Models/TodoList.cs deleted file mode 100644 index d3614af..0000000 --- a/AdvancedTodoList.Core/Models/TodoList.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace AdvancedTodoList.Core.Models; - -public class TodoList -{ - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public string Id { get; set; } = null!; - - public string Name { get; set; } = null!; - - public virtual IEnumerable TodoItems { get; set; } = null!; -} diff --git a/AdvancedTodoList.Core/Models/TodoLists/TodoItem.cs b/AdvancedTodoList.Core/Models/TodoLists/TodoItem.cs new file mode 100644 index 0000000..fc95179 --- /dev/null +++ b/AdvancedTodoList.Core/Models/TodoLists/TodoItem.cs @@ -0,0 +1,73 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace AdvancedTodoList.Core.Models.TodoLists; + +/// +/// Represents a to-do list item entity. +/// +public class TodoItem +{ + /// + /// An unique identifier for the to-do list item. + /// + [Key] + public int Id { get; set; } + /// + /// Name (title) of the to-do item. + /// + [MaxLength(NameMaxLength)] + public string Name { get; set; } = null!; + /// + /// Description of the to-do item. + /// + [MaxLength(DescriptionMaxLength)] + public string Description { get; set; } = null!; + /// + /// Current state of the to-do item. + /// + public TodoItemState State { get; set; } + /// + /// Deadline date for the todo item. Can be null. + /// + public DateTime? DeadlineDate { get; set; } + + /// + /// Foreign key referencing the associated to-do list. + /// + [ForeignKey(nameof(TodoList))] + public string TodoListId { get; set; } = null!; + + /// + /// Maximum allowed length of . + /// + public const int NameMaxLength = 100; + /// + /// Maximum allowed length of . + /// + public const int DescriptionMaxLength = 10_000; + + /// + /// To-do list associated with this to-do item. + /// + public TodoList TodoList { get; set; } = null!; +} + +/// +/// An enum that represents the possible states of a to-do list item. +/// +public enum TodoItemState : byte +{ + /// + /// The task is active (default state). + /// + Active = 0, + /// + /// The task has been completed. + /// + Completed, + /// + /// The task has been skipped. + /// + Skipped +} diff --git a/AdvancedTodoList.Core/Models/TodoLists/TodoList.cs b/AdvancedTodoList.Core/Models/TodoLists/TodoList.cs new file mode 100644 index 0000000..596625d --- /dev/null +++ b/AdvancedTodoList.Core/Models/TodoLists/TodoList.cs @@ -0,0 +1,42 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace AdvancedTodoList.Core.Models.TodoLists; + +/// +/// Represents a to-do list entity. +/// +public class TodoList +{ + /// + /// An unique identifier for the to-do list. + /// + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public string Id { get; set; } = null!; + + /// + /// Name (title) of the to-do list. + /// + [MaxLength(NameMaxLength)] + public string Name { get; set; } = null!; + /// + /// Description of the to-do list. + /// + [MaxLength(DescriptionMaxLength)] + public string Description { get; set; } = null!; + + /// + /// Maximum allowed length of . + /// + public const int NameMaxLength = 100; + /// + /// Maximum allowed length of . + /// + public const int DescriptionMaxLength = 25_000; + + /// + /// Collection of to-do items associated with this todo list. + /// + public virtual IEnumerable TodoItems { get; set; } = null!; +} diff --git a/AdvancedTodoList.Core/Services/ITodoListsService.cs b/AdvancedTodoList.Core/Services/ITodoListsService.cs index 4f9f071..6dd3516 100644 --- a/AdvancedTodoList.Core/Services/ITodoListsService.cs +++ b/AdvancedTodoList.Core/Services/ITodoListsService.cs @@ -1,5 +1,5 @@ using AdvancedTodoList.Core.Dtos; -using AdvancedTodoList.Core.Models; +using AdvancedTodoList.Core.Models.TodoLists; namespace AdvancedTodoList.Core.Services; diff --git a/AdvancedTodoList.Infrastructure/Data/ApplicationDbContext.cs b/AdvancedTodoList.Infrastructure/Data/ApplicationDbContext.cs index 5d84aac..151312e 100644 --- a/AdvancedTodoList.Infrastructure/Data/ApplicationDbContext.cs +++ b/AdvancedTodoList.Infrastructure/Data/ApplicationDbContext.cs @@ -1,6 +1,8 @@ using AdvancedTodoList.Core.Models; +using AdvancedTodoList.Core.Models.TodoLists; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; + namespace AdvancedTodoList.Infrastructure.Data; public class ApplicationDbContext(DbContextOptions options) : diff --git a/AdvancedTodoList.Infrastructure/Migrations/20240209192939_BasicTodoList.Designer.cs b/AdvancedTodoList.Infrastructure/Migrations/20240209192939_BasicTodoList.Designer.cs new file mode 100644 index 0000000..00524d5 --- /dev/null +++ b/AdvancedTodoList.Infrastructure/Migrations/20240209192939_BasicTodoList.Designer.cs @@ -0,0 +1,351 @@ +// +using System; +using AdvancedTodoList.Infrastructure.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace AdvancedTodoList.Infrastructure.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20240209192939_BasicTodoList")] + partial class BasicTodoList + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("AdvancedTodoList.Core.Models.ApplicationUser", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoLists.TodoItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DeadlineDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(10000) + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TodoListId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("TodoListId"); + + b.ToTable("TodoItems"); + }); + + modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoLists.TodoList", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(25000) + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("TodoLists"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoLists.TodoItem", b => + { + b.HasOne("AdvancedTodoList.Core.Models.TodoLists.TodoList", "TodoList") + .WithMany("TodoItems") + .HasForeignKey("TodoListId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TodoList"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("AdvancedTodoList.Core.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("AdvancedTodoList.Core.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AdvancedTodoList.Core.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("AdvancedTodoList.Core.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoLists.TodoList", b => + { + b.Navigation("TodoItems"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/AdvancedTodoList.Infrastructure/Migrations/20240209192939_BasicTodoList.cs b/AdvancedTodoList.Infrastructure/Migrations/20240209192939_BasicTodoList.cs new file mode 100644 index 0000000..63a593d --- /dev/null +++ b/AdvancedTodoList.Infrastructure/Migrations/20240209192939_BasicTodoList.cs @@ -0,0 +1,98 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace AdvancedTodoList.Infrastructure.Migrations; + +/// +public partial class BasicTodoList : Migration +{ + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Name", + table: "TodoLists", + type: "nvarchar(100)", + maxLength: 100, + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AddColumn( + name: "Description", + table: "TodoLists", + type: "nvarchar(max)", + maxLength: 25000, + nullable: false, + defaultValue: ""); + + migrationBuilder.AlterColumn( + name: "Name", + table: "TodoItems", + type: "nvarchar(100)", + maxLength: 100, + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AddColumn( + name: "DeadlineDate", + table: "TodoItems", + type: "datetime2", + nullable: true); + + migrationBuilder.AddColumn( + name: "Description", + table: "TodoItems", + type: "nvarchar(max)", + maxLength: 10000, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "State", + table: "TodoItems", + type: "tinyint", + nullable: false, + defaultValue: (byte)0); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Description", + table: "TodoLists"); + + migrationBuilder.DropColumn( + name: "DeadlineDate", + table: "TodoItems"); + + migrationBuilder.DropColumn( + name: "Description", + table: "TodoItems"); + + migrationBuilder.DropColumn( + name: "State", + table: "TodoItems"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "TodoLists", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(100)", + oldMaxLength: 100); + + migrationBuilder.AlterColumn( + name: "Name", + table: "TodoItems", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(100)", + oldMaxLength: 100); + } +} diff --git a/AdvancedTodoList.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs b/AdvancedTodoList.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs index 1363c26..540ec8c 100644 --- a/AdvancedTodoList.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/AdvancedTodoList.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs @@ -87,7 +87,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("AspNetUsers", (string)null); }); - modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoItem", b => + modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoLists.TodoItem", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -95,10 +95,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("Name") + b.Property("DeadlineDate") + .HasColumnType("datetime2"); + + b.Property("Description") .IsRequired() + .HasMaxLength(10000) .HasColumnType("nvarchar(max)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("State") + .HasColumnType("tinyint"); + b.Property("TodoListId") .IsRequired() .HasColumnType("nvarchar(450)"); @@ -110,15 +122,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("TodoItems"); }); - modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoList", b => + modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoLists.TodoList", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("nvarchar(450)"); - b.Property("Name") + b.Property("Description") .IsRequired() + .HasMaxLength(25000) .HasColumnType("nvarchar(max)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.HasKey("Id"); b.ToTable("TodoLists"); @@ -257,10 +276,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("AspNetUserTokens", (string)null); }); - modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoItem", b => + modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoLists.TodoItem", b => { - b.HasOne("AdvancedTodoList.Core.Models.TodoList", "TodoList") - .WithMany() + b.HasOne("AdvancedTodoList.Core.Models.TodoLists.TodoList", "TodoList") + .WithMany("TodoItems") .HasForeignKey("TodoListId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -318,6 +337,11 @@ protected override void BuildModel(ModelBuilder modelBuilder) .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("AdvancedTodoList.Core.Models.TodoLists.TodoList", b => + { + b.Navigation("TodoItems"); + }); #pragma warning restore 612, 618 } } diff --git a/AdvancedTodoList.Infrastructure/Services/TodoListsService.cs b/AdvancedTodoList.Infrastructure/Services/TodoListsService.cs index 380fb60..b328bea 100644 --- a/AdvancedTodoList.Infrastructure/Services/TodoListsService.cs +++ b/AdvancedTodoList.Infrastructure/Services/TodoListsService.cs @@ -1,5 +1,5 @@ using AdvancedTodoList.Core.Dtos; -using AdvancedTodoList.Core.Models; +using AdvancedTodoList.Core.Models.TodoLists; using AdvancedTodoList.Core.Services; using AdvancedTodoList.Infrastructure.Data; using Mapster; diff --git a/AdvancedTodoList.IntegrationTests/Services/TodoListServiceTests.cs b/AdvancedTodoList.IntegrationTests/Services/TodoListServiceTests.cs index 13f20dc..8f488a4 100644 --- a/AdvancedTodoList.IntegrationTests/Services/TodoListServiceTests.cs +++ b/AdvancedTodoList.IntegrationTests/Services/TodoListServiceTests.cs @@ -1,5 +1,5 @@ using AdvancedTodoList.Core.Dtos; -using AdvancedTodoList.Core.Models; +using AdvancedTodoList.Core.Models.TodoLists; using AdvancedTodoList.Core.Services; using Mapster; using Microsoft.EntityFrameworkCore; diff --git a/AdvancedTodoList.RouteTests/Tests/TodoListsEndpointsTests.cs b/AdvancedTodoList.RouteTests/Tests/TodoListsEndpointsTests.cs index c646060..e3ba1b9 100644 --- a/AdvancedTodoList.RouteTests/Tests/TodoListsEndpointsTests.cs +++ b/AdvancedTodoList.RouteTests/Tests/TodoListsEndpointsTests.cs @@ -1,8 +1,8 @@ using AdvancedTodoList.Core.Dtos; -using System.Net.Http.Json; -using AdvancedTodoList.Core.Models; +using AdvancedTodoList.Core.Models.TodoLists; using NSubstitute.ReturnsExtensions; using System.Net; +using System.Net.Http.Json; namespace AdvancedTodoList.RouteTests.Tests;