First table in database
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GerbilManagerWebAPI.Models
|
||||
{
|
||||
public record Breeder
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; init; }
|
||||
public string Name { get; init; }
|
||||
public string? Name { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GerbilManagerWebAPI.Models
|
||||
{
|
||||
public record Gerbil
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; init; }
|
||||
public string Name { get; init; }
|
||||
public required string Name { get; init; }
|
||||
public Gender Gender { get; init; }
|
||||
public Litter Litter { get; init; }
|
||||
public Breeder Breeder { get; init; }
|
||||
public Litter? Litter { get; set; }
|
||||
public Breeder? Breeder { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GerbilManagerWebAPI.Models
|
||||
{
|
||||
public record Litter
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; init; }
|
||||
public string Name { get; init; }
|
||||
public string? Name { get; init; }
|
||||
public DateTime Date { get; init; }
|
||||
public int Strength { get; init; }
|
||||
public Gerbil Father { get; init; }
|
||||
public Gerbil Mother { get; init; }
|
||||
public Gerbil? Father { get; init; }
|
||||
public Gerbil? Mother { get; init; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user