Made description and note optional, auto added title and description from metadata if not provided
This commit is contained in:
@ -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>();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user