initial commit

This commit is contained in:
Julian
2022-01-23 19:20:13 +01:00
parent d4508520d4
commit 0e1b585db6
25 changed files with 758 additions and 0 deletions

13
Dtos/CreateFamilyDto.cs Normal file
View File

@@ -0,0 +1,13 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace weddingapi.Dtos
{
public record CreateFamilyDto
{
[Required]
public string Name { get; init; }
[Required]
public IList<PersonDto> Members { get; init;}
}
}

16
Dtos/FamilyDto.cs Normal file
View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
namespace weddingapi.Dtos
{
public record FamilyDto
{
public Guid Id { get; init; }
public string Name { get; init; }
public DateTimeOffset CreatedDate { get; set; }
public IList<PersonDto> Members { get; init;}
}
}

11
Dtos/PersonDto.cs Normal file
View File

@@ -0,0 +1,11 @@
using System;
namespace weddingapi.Dtos
{
public record PersonDto
{
public string Name { get; init; }
public bool IsChild { get; set; }
}
}

13
Dtos/UpdateFamilyDto.cs Normal file
View File

@@ -0,0 +1,13 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace weddingapi.Dtos
{
public record UpdateFamilyDto
{
[Required]
public string Name { get; init; }
[Required]
public IList<PersonDto> Members { get; init;}
}
}