UsersController
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -11,10 +12,13 @@ namespace Data.Entities
|
||||
public class Rents
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
[ForeignKey("Car")]
|
||||
public int CarId { get; set; }
|
||||
public virtual Car Car { get; set; }
|
||||
[Required]
|
||||
public DateTime StartDate { get; set; }
|
||||
[Required]
|
||||
public DateTime EndDate { get; set; }
|
||||
[ForeignKey("User")]
|
||||
public string UserId { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user