using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AyCode.Interfaces.Entities;
using AyCode.Interfaces.TimeStampInfo;
using TIAM.Entities.Drivers;
using TIAM.Entities.Users;

namespace TIAM.Entities.Transfers;

[Table(nameof(TransferToDriver))]
public class TransferToDriver : IEntityGuid, ITimeStampInfo, IUserProductMappingForeignKey
{
    [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
    public Guid Id { get; set; }

    public Guid TransferId { get; set; }
    public Guid UserProductMappingId { get; set; }
    public Guid CarId { get; set; }

    public virtual Car Car { get; set; }
    public virtual Transfer Transfer { get; set; }

    public string LicencePlate { get; set; }
    public double Price { get; set; }

    public DateTime Created { get; set; }
    public DateTime Modified { get; set; }

    public TransferToDriver() {}

    public TransferToDriver(Guid id, Guid transferId, Guid userProductMappingId, Guid carId, string licencePlate, double price)
    {
        Id = id;
        TransferId = transferId;
        UserProductMappingId = userProductMappingId;
        CarId = carId;
        LicencePlate = licencePlate;
        Price = price;
    }
}