Added endpoint and functionality for getting, retrieving and deleting bookmarks, and for adding and removing tags for a bookmark
This commit is contained in:
@ -32,12 +32,15 @@ namespace YABA.Data.Context
|
||||
});
|
||||
|
||||
modelBuilder.Entity<BookmarkTag>()
|
||||
.HasIndex(x => new { x.BookmarkId, x.TagId })
|
||||
.IsUnique();
|
||||
.HasKey(x => new { x.BookmarkId, x.TagId });
|
||||
|
||||
modelBuilder.Entity<User>()
|
||||
.HasIndex(x => x.Auth0Id)
|
||||
.IsUnique();
|
||||
|
||||
modelBuilder.Entity<Tag>()
|
||||
.HasIndex(x => x.Name)
|
||||
.IsUnique();
|
||||
}
|
||||
|
||||
public DbSet<Bookmark> Bookmarks { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user