BlazorStart/Start/Shared/BookmarkGroupDto.cs

31 lines
811 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,
IList<BookmarkDto> bookmarks) : this(bookmarkGroupId, title, color) {
this.Bookmarks = bookmarks;
}
}
}