Added endpoint and functionality for getting, retrieving and deleting bookmarks, and for adding and removing tags for a bookmark
This commit is contained in:
@ -1,20 +1,21 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using YABA.Common.Interfaces;
|
||||
using YABA.Models.Interfaces;
|
||||
|
||||
namespace YABA.Models
|
||||
{
|
||||
public class Bookmark : IIdentifiable, ISoftDeletable, IDateCreatedTrackable, IDateModifiedTrackable
|
||||
public class Bookmark : IIdentifiable, IDateCreatedTrackable, IDateModifiedTrackable, IBookmark
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
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 bool IsHidden { get; set; }
|
||||
public string Url { get; set; }
|
||||
|
||||
[Required]
|
||||
[ForeignKey(nameof(User))]
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using YABA.Models.Interfaces;
|
||||
|
||||
namespace YABA.Models
|
||||
{
|
||||
public class BookmarkTag : IIdentifiable
|
||||
public class BookmarkTag
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[ForeignKey(nameof(Bookmark))]
|
||||
public int BookmarkId { get; set; }
|
||||
|
||||
@ -4,10 +4,9 @@ using YABA.Models.Interfaces;
|
||||
|
||||
namespace YABA.Models
|
||||
{
|
||||
public class Tag : IIdentifiable, ISoftDeletable
|
||||
public class Tag : IIdentifiable
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool IsHidden { get; set; }
|
||||
|
||||
|
||||
@ -9,4 +9,8 @@
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\YABA.Common\YABA.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user