BlazorStart/Start/Shared/BookmarkGroupDto.cs

31 lines
812 B
C#
Raw Normal View History

2021-11-14 04:27:59 +00:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Start.Shared {
public class BookmarkGroupDto {
public int BookmarkGroupId { get; set; }
[StringLength(300)]
public string Title { get; set; }
[StringLength(6)]
public string Color { get; set; }
public IList<BookmarkDto>? Bookmarks { get; set; }
public BookmarkGroupDto(string title, string color) {
this.Title = title;
this.Color = color;
}
public BookmarkGroupDto(int bookmarkGroupId, string title, string color)
: this(title, color) {
this.BookmarkGroupId = bookmarkGroupId;
}
public BookmarkGroupDto(int bookmarkGroupId, string title, string color,
2021-11-16 05:44:16 +00:00
IList<BookmarkDto>? bookmarks) : this(bookmarkGroupId, title, color) {
2021-11-14 04:27:59 +00:00
this.Bookmarks = bookmarks;
}
}
}