initial commit
This commit is contained in:
13
Dtos/CreateFamilyDto.cs
Normal file
13
Dtos/CreateFamilyDto.cs
Normal 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
16
Dtos/FamilyDto.cs
Normal 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
11
Dtos/PersonDto.cs
Normal 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
13
Dtos/UpdateFamilyDto.cs
Normal 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;}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user