2021-12-05 23:50:48 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-11-14 04:27:59 +00:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2021-11-21 06:47:10 +00:00
|
|
|
|
using System.Text.Json.Serialization;
|
2021-11-14 04:27:59 +00:00
|
|
|
|
|
|
|
|
|
namespace Start.Shared {
|
|
|
|
|
public class BookmarkContainerDto {
|
|
|
|
|
public int BookmarkContainerId { get; set; }
|
2021-11-29 00:21:15 +00:00
|
|
|
|
[Required]
|
2021-11-14 04:27:59 +00:00
|
|
|
|
[StringLength(300)]
|
|
|
|
|
public string Title { get; set; }
|
2022-04-19 20:04:38 +00:00
|
|
|
|
public int SortOrder { get; set; }
|
2021-11-14 04:27:59 +00:00
|
|
|
|
|
|
|
|
|
public IList<BookmarkGroupDto>? BookmarkGroups { get; set; }
|
|
|
|
|
|
2022-04-19 20:04:38 +00:00
|
|
|
|
public BookmarkContainerDto(string title, int sortOrder) {
|
2021-11-14 04:27:59 +00:00
|
|
|
|
this.Title = title;
|
2022-04-19 20:04:38 +00:00
|
|
|
|
this.SortOrder = sortOrder;
|
2021-11-14 04:27:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-04-19 20:04:38 +00:00
|
|
|
|
public BookmarkContainerDto(int bookmarkContainerId, string title, int sortOrder)
|
|
|
|
|
: this(title, sortOrder) {
|
2021-11-14 04:27:59 +00:00
|
|
|
|
this.BookmarkContainerId = bookmarkContainerId;
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-21 06:47:10 +00:00
|
|
|
|
[JsonConstructor]
|
2022-04-19 20:04:38 +00:00
|
|
|
|
public BookmarkContainerDto(int bookmarkContainerId, string title, int sortOrder,
|
|
|
|
|
IList<BookmarkGroupDto>? bookmarkGroups) : this(bookmarkContainerId, title, sortOrder) {
|
2021-11-14 04:27:59 +00:00
|
|
|
|
this.BookmarkGroups = bookmarkGroups;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|