firstCommit
This commit is contained in:
25
RentACar/Data/Entities/Car.cs
Normal file
25
RentACar/Data/Entities/Car.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Data.Entities
|
||||
{
|
||||
public class Car
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Brand { get; set; }
|
||||
|
||||
public string Model { get; set; }
|
||||
|
||||
public int Year { get; set; }
|
||||
|
||||
public int CountPassengerSeats { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public decimal PriceForDay { get; set; }
|
||||
}
|
||||
}
|
||||
21
RentACar/Data/Entities/Rents.cs
Normal file
21
RentACar/Data/Entities/Rents.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Data.Entities
|
||||
{
|
||||
public class Rents
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public virtual Car Car { get; set; }
|
||||
|
||||
public DateTime StartDate { get; set; }
|
||||
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
public virtual User User { get; set; }
|
||||
}
|
||||
}
|
||||
26
RentACar/Data/Entities/Role.cs
Normal file
26
RentACar/Data/Entities/Role.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Data.Entities
|
||||
{
|
||||
public class Role
|
||||
{
|
||||
public Role()
|
||||
{
|
||||
this.Users = new HashSet<User>();
|
||||
}
|
||||
|
||||
public Role(string name) : this()
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public virtual ICollection<User> Users { get; set; }
|
||||
}
|
||||
}
|
||||
31
RentACar/Data/Entities/User.cs
Normal file
31
RentACar/Data/Entities/User.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Data.Entities
|
||||
{
|
||||
public class User
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Username { get; set; }
|
||||
|
||||
public string Password { get; set; }
|
||||
|
||||
public string FirstName { get; set; }
|
||||
|
||||
public string LastName { get; set; }
|
||||
|
||||
public int PersonalNumber { get; set; }
|
||||
|
||||
public int PhoneNumber { get; set; }
|
||||
|
||||
public string Email { get; set; }
|
||||
|
||||
public int RoleId { get; set; }
|
||||
|
||||
public Role Role { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user