using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace Start.Server.Models { /// A group of s public class BookmarkGroup { /// A unique ID for the group [Key] public int BookmarkGroupId { get; set; } /// The title of the group [MaxLength(300)] public string Title { get; set; } /// A hex color for the group [MaxLength(6)] public string Color { get; set; } /// Used for sorting lists of bookmark groups public int SortOrder { get; set; } /// The unique ID of the container this group is in public int BookmarkContainerId { get; set; } /// The container this group is in public BookmarkContainer? BookmarkContainer { get; set; } /// The bookmarks in this group public List? Bookmarks { get; set; } public BookmarkGroup(string title, string color, int sortOrder, int bookmarkContainerId) { this.Title = title; this.Color = color; this.SortOrder = sortOrder; this.BookmarkContainerId = bookmarkContainerId; } public BookmarkGroup(int bookmarkGroupId, string title, string color, int sortOrder, int bookmarkContainerId) : this(title, color, sortOrder, bookmarkContainerId) { this.BookmarkGroupId = bookmarkGroupId; } } }