Lots of changes to get code ready to add library.

This commit is contained in:
Joseph Milazzo 2020-12-17 11:27:19 -06:00
parent 67b97b3be2
commit d5eed4e85d
20 changed files with 570 additions and 3 deletions

View file

@ -0,0 +1,19 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using API.Entities;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
namespace API.DTOs
{
public class CreateLibraryDto
{
[Required]
public string Name { get; set; }
[Required]
public LibraryType Type { get; set; }
[Required]
[MinLength(1)]
public IEnumerable<string> Folders { get; set; }
}
}

13
API/DTOs/LibraryDto.cs Normal file
View file

@ -0,0 +1,13 @@
using System.Collections.Generic;
using API.Entities;
namespace API.DTOs
{
public class LibraryDto
{
public string Name { get; set; }
public string CoverImage { get; set; }
public LibraryType Type { get; set; }
public ICollection<string> Folders { get; set; }
}
}

View file

@ -1,4 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using API.Entities;
namespace API.DTOs
{
@ -12,5 +15,6 @@ namespace API.DTOs
public DateTime Created { get; set; }
public DateTime LastActive { get; set; }
public bool IsAdmin { get; set; }
//public IEnumerable<Library> Libraries { get; set; }
}
}