protected override Review MapToEntity(CreateReviewDto createInput)
        {
            var reviewDetail = new ReviewDetail(GuidGenerator.Create(), createInput.ReviewDetail.Text,
                                                createInput.ReviewDetail.MediaResources);

            return(new Review(GuidGenerator.Create(), CurrentTenant.Id, createInput.EntityType,
                              createInput.EntityId, createInput.StarCount, createInput.IsPublic, reviewDetail));
        }
Exemple #2
0
 public virtual void Update(
     short starCount,
     bool isPublic,
     ReviewDetail reviewDetail)
 {
     SetStarCount(starCount);
     IsPublic     = isPublic;
     ReviewDetail = reviewDetail;
 }
Exemple #3
0
 public Review(
     Guid id,
     Guid?tenantId,
     string entityType,
     string entityId,
     short starCount,
     bool isPublic,
     ReviewDetail reviewDetail
     ) : base(id)
 {
     TenantId   = tenantId;
     EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), ReviewConsts.MaxEntityTypeLength);
     EntityId   = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ReviewConsts.MaxEntityIdLength);
     SetStarCount(starCount);
     IsPublic     = isPublic;
     ReviewDetail = reviewDetail;
 }