37 lines
1013 B
C#
37 lines
1013 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
using AyCode.Interfaces.Entities;
|
|
using AyCode.Interfaces.TimeStampInfo;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace TIAM.Entities.Drivers;
|
|
|
|
//[Table(nameof(UserProductToCar))]
|
|
//[Owned]
|
|
public class UserProductToCar //: IEntityGuid//, ITimeStampInfo, ITimeStampDisableAutoSet
|
|
{
|
|
/// <summary>
|
|
/// Primary key [Guid Id]
|
|
/// </summary>
|
|
public Guid UserProductCarId { get; set; }
|
|
|
|
[NotMapped]
|
|
//public Guid UserProductMappingId { get; set; }
|
|
public Car Car { get; set; }
|
|
|
|
public DateTime Created { get; set; } = DateTime.UtcNow;
|
|
public DateTime Modified { get; set; } = DateTime.UtcNow;
|
|
|
|
public UserProductToCar()
|
|
{ }
|
|
|
|
public UserProductToCar(Car car) : this(Guid.NewGuid(), car)
|
|
{ }
|
|
|
|
public UserProductToCar(Guid userProductCarId, Car car)
|
|
{
|
|
UserProductCarId = userProductCarId;
|
|
Car = car;
|
|
}
|
|
} |