Compare commits
2 Commits
8f25b5cc1a
...
b2c8a278be
Author | SHA1 | Date | |
---|---|---|---|
|
b2c8a278be | ||
|
1f09536c8e |
18
ProjectRacing/Entities/Competitions.cs
Normal file
18
ProjectRacing/Entities/Competitions.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
25
ProjectRacing/Entities/Horse.cs
Normal file
25
ProjectRacing/Entities/Horse.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
21
ProjectRacing/Entities/Jockey.cs
Normal file
21
ProjectRacing/Entities/Jockey.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
16
ProjectRacing/Entities/Owner.cs
Normal file
16
ProjectRacing/Entities/Owner.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
24
ProjectRacing/Entities/Participants.cs
Normal file
24
ProjectRacing/Entities/Participants.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user