Made description and note optional, auto added title and description from metadata if not provided

This commit is contained in:
Carl Tibule
2023-01-28 17:04:49 -06:00
parent 22f5764589
commit 3f4c32107e
12 changed files with 327 additions and 20 deletions

View File

@ -11,11 +11,10 @@ namespace YABA.Common.DTOs.Bookmarks
public DateTimeOffset CreatedOn { get; set; }
public DateTimeOffset LastModified { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string Note { get; set; }
public string? Description { get; set; }
public string? Note { get; set; }
public bool IsHidden { get; set; }
public string Url { get; set; }
public IList<TagSummaryDTO> Tags { get; set; } = new List<TagSummaryDTO>();
}
}

View File

@ -1,13 +1,16 @@
using YABA.Common.Interfaces;
using System.ComponentModel.DataAnnotations;
using YABA.Common.Interfaces;
namespace YABA.Common.DTOs.Bookmarks
{
public class CreateBookmarkRequestDTO : IBookmark
{
public string Title { get; set; }
public string Description { get; set; }
public string Note { get; set; }
public string? Title { get; set; }
public string? Description { get; set; }
public string? Note { get; set; }
public bool IsHidden { get; set; }
[Required]
public string Url { get; set; }
}
}

View File

@ -1,12 +1,16 @@
using YABA.Common.Interfaces;
using System.ComponentModel.DataAnnotations;
using YABA.Common.Interfaces;
namespace YABA.Common.DTOs.Bookmarks
{
public class UpdateBookmarkRequestDTO : IBookmark
{
public string Title { get; set; }
public string Description { get; set; }
public string Note { get; set; }
public string? Title { get; set; }
public string? Description { get; set; }
public string? Note { get; set; }
public bool IsHidden { get; set; }
[Required]
public string Url { get; set; }
}
}