ASP.NET Core Identity integration
This commit is contained in:
25
RentACar/Data/Models/Car.cs
Normal file
25
RentACar/Data/Models/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/Models/Rents.cs
Normal file
21
RentACar/Data/Models/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; }
|
||||
}
|
||||
}
|
||||
18
RentACar/Data/Models/User.cs
Normal file
18
RentACar/Data/Models/User.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Data.Entities
|
||||
{
|
||||
public class User : IdentityUser<string>
|
||||
{
|
||||
public string FirstName { get; set; }
|
||||
|
||||
public string LastName { get; set; }
|
||||
|
||||
public string PersonalNumber { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user