mark required fields
This commit is contained in:
@@ -3,6 +3,6 @@ namespace GerbilManagerWebAPI.Dtos
|
||||
public record BreederDto
|
||||
{
|
||||
public Guid Id { get; init; }
|
||||
public string Name { get; init; }
|
||||
public required string Name { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,6 @@ namespace GerbilManagerWebAPI.Dtos
|
||||
{
|
||||
public record CreateBreederDto
|
||||
{
|
||||
public string Name { get; init; }
|
||||
public required string Name { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@ namespace GerbilManagerWebAPI.Dtos
|
||||
{
|
||||
public record CreateGerbilDto
|
||||
{
|
||||
public string Name { get; init; }
|
||||
public GenderDto Gender { get; init; }
|
||||
public Guid Litter { get; init; }
|
||||
public Guid Breeder { get; init; }
|
||||
public required string Name { get; init; }
|
||||
public required GenderDto Gender { get; init; }
|
||||
public Guid? Litter { get; init; }
|
||||
public Guid? Breeder { get; init; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,10 +2,10 @@ namespace GerbilManagerWebAPI.Dtos
|
||||
{
|
||||
public record CreateLitterDto
|
||||
{
|
||||
public string Name { get; init; }
|
||||
public DateTime Date { get; init; }
|
||||
public int Strength { get; init; }
|
||||
public Guid Father { get; init; }
|
||||
public Guid Mother { get; init; }
|
||||
public required string Name { get; init; }
|
||||
public required DateTime Date { get; init; }
|
||||
public int? Strength { get; init; }
|
||||
public Guid? Father { get; init; }
|
||||
public Guid? Mother { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@ namespace GerbilManagerWebAPI.Dtos
|
||||
public record GerbilDto
|
||||
{
|
||||
public Guid Id { get; init; }
|
||||
public string Name { get; init; }
|
||||
public GenderDto Gender { get; init; }
|
||||
public required string Name { get; init; }
|
||||
public required GenderDto Gender { get; init; }
|
||||
public LitterDto? Litter { get; init; }
|
||||
public BreederDto? Breeder { get; init; }
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ namespace GerbilManagerWebAPI.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; }
|
||||
public required string Name { get; init; }
|
||||
public required DateTime Date { get; init; }
|
||||
public int? Strength { get; init; }
|
||||
public GerbilDto? Father { get; init; }
|
||||
public GerbilDto? Mother { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,6 @@ namespace GerbilManagerWebAPI.Models
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; init; }
|
||||
public string? Name { get; init; }
|
||||
public required string Name { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ namespace GerbilManagerWebAPI.Models
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; init; }
|
||||
public string? Name { get; init; }
|
||||
public DateTime Date { get; init; }
|
||||
public int Strength { get; init; }
|
||||
public required string Name { get; init; }
|
||||
public required DateTime Date { get; init; }
|
||||
public int? Strength { get; init; }
|
||||
public Gerbil? Father { get; init; }
|
||||
public Gerbil? Mother { get; init; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user