2024-09-01 12:28:42 +03:30
|
|
|
|
namespace Netina.Domain.Entities.Reviews;
|
2023-12-20 10:37:44 +03:30
|
|
|
|
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
|
|
|
|
|
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
|
|
|
|
|
|
[AdaptTo("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
|
|
|
|
|
|
[GenerateMapper]
|
|
|
|
|
|
public partial class Review : ApiEntity
|
2023-12-16 20:25:12 +03:30
|
|
|
|
{
|
2023-12-20 10:37:44 +03:30
|
|
|
|
public Review()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-21 20:51:01 +03:30
|
|
|
|
public Review(string title, string comment, float rate, bool isBuyer,bool isAdmin, Guid productId, Guid userId)
|
2023-12-20 10:37:44 +03:30
|
|
|
|
{
|
|
|
|
|
|
Title = title;
|
|
|
|
|
|
Comment = comment;
|
|
|
|
|
|
Rate = rate;
|
|
|
|
|
|
IsBuyer = isBuyer;
|
2024-09-21 20:51:01 +03:30
|
|
|
|
IsAdmin = isAdmin;
|
2023-12-20 10:37:44 +03:30
|
|
|
|
ProductId = productId;
|
|
|
|
|
|
UserId = userId;
|
|
|
|
|
|
}
|
2023-12-16 20:25:12 +03:30
|
|
|
|
public string Title { get; internal set; } = string.Empty;
|
|
|
|
|
|
public string Comment { get; internal set; } = string.Empty;
|
|
|
|
|
|
public float Rate { get; internal set; }
|
|
|
|
|
|
public bool IsBuyer { get; internal set; }
|
2024-01-01 16:18:49 +03:30
|
|
|
|
public bool IsConfirmed { get; internal set; }
|
2024-09-21 20:51:01 +03:30
|
|
|
|
public bool IsAdmin { get; internal set; }
|
2023-12-16 20:25:12 +03:30
|
|
|
|
|
|
|
|
|
|
public Guid ProductId { get; internal set; }
|
|
|
|
|
|
public Product? Product { get; internal set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid UserId { get; internal set; }
|
|
|
|
|
|
public ApplicationUser? User { get; internal set; }
|
|
|
|
|
|
}
|