Introduce dtos

This commit is contained in:
2023-10-16 22:37:49 +02:00
parent 707bfae2e3
commit fc98f99eda
9 changed files with 107 additions and 7 deletions

8
Dtos/BreederDto.cs Normal file
View File

@@ -0,0 +1,8 @@
namespace GerbilManager.Dtos
{
public record BreederDto
{
public Guid Id { get; init; }
public string Name { get; init; }
}
}

9
Dtos/GenderDto.cs Normal file
View File

@@ -0,0 +1,9 @@
namespace GerbilManager.Dtos
{
public enum GenderDto
{
unknown = 0,
male = 1,
female = 2
}
}

11
Dtos/GerbilDto.cs Normal file
View File

@@ -0,0 +1,11 @@
namespace GerbilManager.Dtos
{
public record GerbilDto
{
public Guid Id { get; init; }
public string Name { get; init; }
public GenderDto Gender { get; init; }
public LitterDto Litter { get; init; }
public BreederDto Breeder { get; init; }
}
}

12
Dtos/LitterDto.cs Normal file
View File

@@ -0,0 +1,12 @@
namespace GerbilManager.Dtos
{
public record LitterDto
{
public Guid Id { get; init; }
public string Name { get; init; }
public DateTime Date { get; init; }
public int Strength { get; init; }
public GerbilDto Father { get; init; }
public GerbilDto Mother { get; init; }
}
}