Small EFCore mapping fixes
This commit is contained in:
parent
558f6de8e4
commit
c5273f467e
|
|
@ -16,14 +16,17 @@ public class PermissionGroupUserMapping : IEntityGuid, ITimeStampInfo
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
public DateTime Modified { get; set; }
|
public DateTime Modified { get; set; }
|
||||||
|
|
||||||
public PermissionGroupUserMapping(Guid assignedUserId, Guid permissionContectMappingId) : this (Guid.NewGuid(), assignedUserId, permissionContectMappingId)
|
public PermissionGroupUserMapping(Guid assignedUserId, Guid permissionContextMappingId) : this (Guid.NewGuid(), assignedUserId, permissionContextMappingId)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
public PermissionGroupUserMapping(Guid id, Guid assignedUserId, Guid permissionContectMappingId)
|
public PermissionGroupUserMapping(Guid id, Guid assignedUserId, Guid permissionContextMappingId)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
AssignedUserId = assignedUserId;
|
AssignedUserId = assignedUserId;
|
||||||
PermissionContextMappingId = permissionContectMappingId;
|
PermissionContextMappingId = permissionContextMappingId;
|
||||||
|
Created = DateTime.UtcNow;
|
||||||
|
Modified = DateTime.UtcNow;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +13,7 @@ public class Product : IEntityGuid, ITimeStampInfo
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
public ProductType ProductType { get; set; }
|
public ProductType ProductType { get; set; }
|
||||||
public Guid UsermediaId { get; set; }
|
public Guid UserMediaId { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
@ -27,7 +27,7 @@ public class Product : IEntityGuid, ITimeStampInfo
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
ProductType = type;
|
ProductType = type;
|
||||||
UsermediaId = userMediaId;
|
UserMediaId = userMediaId;
|
||||||
Name = name;
|
Name = name;
|
||||||
Description = description;
|
Description = description;
|
||||||
Price = price;
|
Price = price;
|
||||||
|
|
|
||||||
|
|
@ -9,16 +9,16 @@ namespace TIAM.Entities.Products;
|
||||||
[Table("Products")]
|
[Table("Products")]
|
||||||
public class TiamProduct : Product
|
public class TiamProduct : Product
|
||||||
{
|
{
|
||||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
|
||||||
|
|
||||||
public Guid OwnerId { get; set; }
|
public Guid OwnerId { get; set; }
|
||||||
|
|
||||||
public TiamProduct(Guid ownerId, ProductType type, Guid userMediaId, string name, string description, float price, string jsonDetails) : this(Guid.NewGuid(), ownerId, type, userMediaId, name, description, price, jsonDetails) { }
|
public TiamProduct(Guid ownerId, ProductType productType, Guid userMediaId, string name, string description, float price, string jsonDetails) : this(Guid.NewGuid(), ownerId, productType, userMediaId, name, description, price, jsonDetails) { }
|
||||||
public TiamProduct(Guid id, Guid ownerId, ProductType type, Guid userMediaId, string name, string description, float price, string jsonDetails) : base(id, type, userMediaId, name, description, price, jsonDetails)
|
public TiamProduct(Guid id, Guid ownerId, ProductType productType, Guid userMediaId, string name, string description, float price, string jsonDetails) : base(id, productType, userMediaId, name, description, price, jsonDetails)
|
||||||
{
|
{
|
||||||
OwnerId = ownerId;
|
OwnerId = ownerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +48,6 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
//Array.Resize(ref users, users.Length + 1);
|
//Array.Resize(ref users, users.Length + 1);
|
||||||
//users[users.Length - 1] = new UserModel(user.Email, user.PhoneNumber, user.Password);
|
//users[users.Length - 1] = new UserModel(user.Email, user.PhoneNumber, user.Password);
|
||||||
|
|
||||||
|
|
||||||
var id = Guid.NewGuid();
|
var id = Guid.NewGuid();
|
||||||
string? name = SerializedServiceProviderModel?.Name;
|
string? name = SerializedServiceProviderModel?.Name;
|
||||||
Guid ownerId = SerializedServiceProviderModel?.OwnerId ?? Guid.Empty;
|
Guid ownerId = SerializedServiceProviderModel?.OwnerId ?? Guid.Empty;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue