Add ProductId to Transfer; Add IsAdmin to UserProductMapping;

This commit is contained in:
jozsef.b@aycode.com 2024-01-19 07:34:52 +01:00
parent b058d80c2e
commit ca17d28bfa
3 changed files with 5 additions and 2 deletions

View File

@ -311,6 +311,7 @@ namespace TIAM.Database.Test
{
Id = transferId,
ProductId = productId,
//ReferralProductId = productId,
Appointment = DateTime.UtcNow.AddDays(3),
FlightNumber = "GSD234",
FromAddress = fromAddress,

View File

@ -10,11 +10,12 @@ using TIAM.Entities.Products;
namespace TIAM.Entities.Transfers;
[Table(nameof(Transfer))]
public class Transfer: IEntityGuid, ITimeStampInfo, IProductForeignKey<Guid?>
public class Transfer: IEntityGuid, ITimeStampInfo, IProductForeignKey
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
public Guid Id { get; set; }
public Guid ProductId { get; set; }
public Guid? UserProductMappingId { get; set; }
public Guid? UserProductToCarId { get; set; }
[Required] public TransferStatusType TransferStatusType { get; set; } = TransferStatusType.OrderSubmitted;
@ -31,7 +32,7 @@ public class Transfer: IEntityGuid, ITimeStampInfo, IProductForeignKey<Guid?>
[MaxLength(250)] public string? Comment { get; set; }
[Column("ReferralProductId")]
public Guid? ProductId { get; set; }
public Guid? ReferralProductId { get; set; }
public DateTime Created { get; set; }
public DateTime Modified { get; set; }

View File

@ -22,6 +22,7 @@ public class UserProductMapping : IEntityGuid, IUserForeignKey, IProductForeignK
public virtual Product Product { get; set; }
public int Permissions { get; set; } = 1;
public bool IsAdmin { get; set; }
//[JsonIgnore]
//private string? JsonDetails { get; set; }