diff --git a/src/Application/Common/DTOs/Books/BookForUpdateDto.cs b/src/Application/Common/DTOs/Books/BookForUpdateDto.cs index 7261844..f9e24bc 100644 --- a/src/Application/Common/DTOs/Books/BookForUpdateDto.cs +++ b/src/Application/Common/DTOs/Books/BookForUpdateDto.cs @@ -12,20 +12,20 @@ public class BookForUpdateDto public Guid Guid { get; set; } [MinLength(2, ErrorMessage = "The title is too short")] - [MaxLength(200, ErrorMessage = "The title is too long")] + [MaxLength(2000, ErrorMessage = "The title is too long")] public string Title { get; set; } [Range(0, int.MaxValue)] public int CurrentPage { get; set; } [EmptyOrMinLength(2, ErrorMessage = "The language is too short")] - [MaxLength(60, ErrorMessage = "The language is too long")] + [MaxLength(100, ErrorMessage = "The language is too long")] public string Language { get; set; } - [MaxLength(200, ErrorMessage = "The creator is too long")] + [MaxLength(2000, ErrorMessage = "The creator is too long")] public string Creator { get; set; } - [MaxLength(400, ErrorMessage = "The authors are too long")] + [MaxLength(2000, ErrorMessage = "The authors are too long")] public string Authors { get; set; } [MaxLength(100, ErrorMessage = "The creation date is too long")] diff --git a/src/Application/Common/DTOs/Books/BookInDto.cs b/src/Application/Common/DTOs/Books/BookInDto.cs index 93a6f68..18c8a5a 100644 --- a/src/Application/Common/DTOs/Books/BookInDto.cs +++ b/src/Application/Common/DTOs/Books/BookInDto.cs @@ -15,7 +15,7 @@ public class BookInDto [Required] [MinLength(2, ErrorMessage = "The title is too short")] - [MaxLength(200, ErrorMessage = "The title is too long")] + [MaxLength(2000, ErrorMessage = "The title is too long")] public string Title { get; set; } [Required] @@ -28,11 +28,11 @@ public class BookInDto [Required] [MinLength(2, ErrorMessage = "The format is too short")] - [MaxLength(60, ErrorMessage = "The format is too long")] + [MaxLength(100, ErrorMessage = "The format is too long")] public string Format { get; set; } [EmptyOrMinLength(2, ErrorMessage = "The language is too short")] - [MaxLength(60, ErrorMessage = "The language is too long")] + [MaxLength(100, ErrorMessage = "The language is too long")] public string Language { get; set; } [Required] @@ -41,16 +41,16 @@ public class BookInDto public string DocumentSize { get; set; } [EmptyOrMinLength(2, ErrorMessage = "The pages size is too short")] - [MaxLength(100, ErrorMessage = "The pages size is too long")] + [MaxLength(600, ErrorMessage = "The pages size is too long")] public string PagesSize { get; set; } - [MaxLength(200, ErrorMessage = "The creator is too long")] + [MaxLength(2000, ErrorMessage = "The creator is too long")] public string Creator { get; set; } - [MaxLength(400, ErrorMessage = "The authors are too long")] + [MaxLength(2000, ErrorMessage = "The authors are too long")] public string Authors { get; set; } - [MaxLength(100, ErrorMessage = "The creation date is too long")] + [MaxLength(140, ErrorMessage = "The creation date is too long")] public string CreationDate { get; set; } [Required] diff --git a/src/Domain/Entities/Book.cs b/src/Domain/Entities/Book.cs index c00f2d9..55bab24 100644 --- a/src/Domain/Entities/Book.cs +++ b/src/Domain/Entities/Book.cs @@ -11,7 +11,7 @@ public class Book [Required] [MinLength(2, ErrorMessage = "The book title is too short")] - [MaxLength(200, ErrorMessage = "The book title is too long")] + [MaxLength(2000, ErrorMessage = "The book title is too long")] public string Title { get; set; } [Required] @@ -24,27 +24,27 @@ public class Book [Required] [MinLength(1, ErrorMessage = "The format is too short")] - [MaxLength(40, ErrorMessage = "The format is too long")] + [MaxLength(100, ErrorMessage = "The format is too long")] public string Format { get; set; } [MinLength(2, ErrorMessage = "The language is too short")] - [MaxLength(50, ErrorMessage = "The language is too long")] + [MaxLength(100, ErrorMessage = "The language is too long")] public string Language { get; set; } [Required] [MinLength(2, ErrorMessage = "The document size is too short")] - [MaxLength(30, ErrorMessage = "The document size is too long")] + [MaxLength(60, ErrorMessage = "The document size is too long")] public string DocumentSize { get; set; } [Required] [MinLength(2, ErrorMessage = "The pages size is too short")] - [MaxLength(100, ErrorMessage = "The pages size is too long")] + [MaxLength(600, ErrorMessage = "The pages size is too long")] public string PagesSize { get; set; } - [MaxLength(140, ErrorMessage = "The creator is too long")] + [MaxLength(2000, ErrorMessage = "The creator is too long")] public string Creator { get; set; } - [MaxLength(400, ErrorMessage = "The authors are too long")] + [MaxLength(2000, ErrorMessage = "The authors are too long")] public string Authors { get; set; } [MaxLength(140, ErrorMessage = "The creation date is too long")] diff --git a/src/Infrastructure/Persistence/Migrations/DataContextModelSnapshot.cs b/src/Infrastructure/Persistence/Migrations/DataContextModelSnapshot.cs index 5b18336..2bbdac9 100644 --- a/src/Infrastructure/Persistence/Migrations/DataContextModelSnapshot.cs +++ b/src/Infrastructure/Persistence/Migrations/DataContextModelSnapshot.cs @@ -32,8 +32,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("Authors") - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ColorTheme") .IsRequired() @@ -53,16 +53,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(140)"); b.Property("Creator") - .HasMaxLength(140) - .HasColumnType("nvarchar(140)"); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("CurrentPage") .HasColumnType("int"); b.Property("DocumentSize") .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); + .HasMaxLength(60) + .HasColumnType("nvarchar(60)"); b.Property("FileHash") .IsRequired() @@ -72,15 +72,15 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Format") .IsRequired() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("HasCover") .HasColumnType("bit"); b.Property("Language") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("LastModified") .IsRequired() @@ -94,8 +94,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("PagesSize") .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasMaxLength(600) + .HasColumnType("nvarchar(600)"); b.Property("ParentFolderId") .HasMaxLength(200) @@ -108,8 +108,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Title") .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("UserId") .IsRequired()