2021-11-13 03:21:59 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace Start.Server.Models {
|
|
|
|
|
/// <summary>A group of <see cref="BookmarkGroup"/>s</summary>
|
|
|
|
|
public class BookmarkContainer {
|
|
|
|
|
/// <summary>A unique ID for the container</summary>
|
|
|
|
|
[Key]
|
|
|
|
|
public int BookmarkContainerId { get; set; }
|
|
|
|
|
|
2021-11-14 04:27:24 +00:00
|
|
|
|
[MaxLength(300)]
|
2021-11-13 03:21:59 +00:00
|
|
|
|
public string Title { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>The unique ID of the user that this container belongs to</summary>
|
|
|
|
|
public string ApplicationUserId { get; set; }
|
|
|
|
|
/// <summary>The user that this container belongs to</summary>
|
|
|
|
|
public ApplicationUser? ApplicationUser { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>The <see cref="BookmarkGroup"/>s in this container</summary>
|
|
|
|
|
public List<BookmarkGroup>? BookmarkGroups { get; set; }
|
|
|
|
|
|
|
|
|
|
public BookmarkContainer(string applicationUserId, string title) {
|
|
|
|
|
this.ApplicationUserId = applicationUserId;
|
|
|
|
|
this.Title = title;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BookmarkContainer(int bookmarkContainerId, string applicationUserId, string title)
|
|
|
|
|
: this(applicationUserId, title) {
|
|
|
|
|
this.BookmarkContainerId = bookmarkContainerId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|