Compare commits

...

2 Commits

Author SHA1 Message Date
repka228
b2c8a278be изменения сущностей 2024-11-11 06:21:25 +04:00
repka228
1f09536c8e сущности 2024-11-11 00:09:18 +04:00
5 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,18 @@
namespace ProjectRacing.Entities;
public class Competitions
{
public int Id { get; set; }
public DateOnly DateOfCompetitions { get; set; }
public string Adress { get; set; } = string.Empty;
public static Competitions CreateEntity(int id, DateOnly dateOfCompetitions, string adress)
{
return new Competitions
{
Id = id,
Adress = adress,
DateOfCompetitions = dateOfCompetitions
};
}
}

View File

@ -0,0 +1,25 @@
namespace ProjectRacing.Entities;
public class Horse
{
public int Id { get; private set; }
public string NameOfHorse { get; private set; } = string.Empty;
public bool Sex { get; private set; }
public DateOnly Birthday { get; private set; }
public int OwnerId { get; private set; }
public static Horse CreateEntity(int id, string nameOfHorse, bool sex, DateOnly birthday, int ownerId)
{
return new Horse
{
Id = id,
NameOfHorse = nameOfHorse,
Sex = sex,
Birthday = birthday,
OwnerId = ownerId
};
}
}

View File

@ -0,0 +1,21 @@
namespace ProjectRacing.Entities;
public class Jockey
{
public int Id { get; private set; }
public string NameOfJockey { get; private set; } = string.Empty;
public int Age { get; private set; }
public int Rating { get; private set; }
public string Number { get; private set; } = string.Empty;
public static Jockey CreateEntity(int id, string nameOfJockey, int age, int rating, string number)
{
return new Jockey
{
Id = id,
NameOfJockey = nameOfJockey,
Age = age,
Rating = rating,
Number = number
};
}
}

View File

@ -0,0 +1,16 @@
namespace ProjectRacing.Entities;
public class Owner
{
public int Id { get; private set; }
public string NameOfOwner { get; private set; } = string.Empty;
public string Number { get; private set; } = string.Empty;
public static Owner CreateEntity(int id, string nameOfOwner, string number)
{
return new Owner
{
Id = id,
NameOfOwner = nameOfOwner,
Number = number
};
}
}

View File

@ -0,0 +1,24 @@
namespace ProjectRacing.Entities;
public class Participants
{
public int ParticipantId { get; private set; }
public int JockeyId { get; private set; }
public int HorseId { get; private set; }
public int CompetitionsId { get; private set; }
public TimeSpan HorseTime { get; private set; }
public int HorsePlase { get; private set; }
public static Participants CreateEntity(int id, int jockeyId, int horseId, int competitionsId, TimeSpan horseTime, int horsePlace)
{
return new Participants
{
ParticipantId = id,
JockeyId = jockeyId,
HorseId = horseId,
CompetitionsId = competitionsId,
HorseTime = horseTime,
HorsePlase = horsePlace
};
}
}