获取绑定关系 获取分组名称
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
Hewt 2026-03-24 15:37:29 +08:00
parent b7f53f4036
commit 94bf9895af
3 changed files with 25 additions and 2 deletions

View File

@ -16,6 +16,17 @@ public class SegmentBindingView : SegmentBindingAddOrEdit
public DateTime UpdateTime { get; set; }
/// <summary>
/// 分割分组名称
/// </summary>
public string SegmentationName { get; set; } = string.Empty;
/// <summary>
/// SegmentName
/// </summary>
public string SegmentName { get; set; } = string.Empty;
}
public class SaveSegmentBindingAndAnswerInDto

View File

@ -27,7 +27,9 @@ namespace IRaCIS.Core.Application.Service
// 在此处拷贝automapper 映射
CreateMap<SegmentBinding, SegmentBindingView>();
CreateMap<SegmentBinding, SegmentBindingView>()
.ForMember(d => d.SegmentName, u => u.MapFrom(s => s.Segment.SegmentName))
.ForMember(d => d.SegmentationName, u => u.MapFrom(s => s.Segmentation.SegmentationName));
CreateMap<SegmentBinding, SegmentBindingAddOrEdit>().ReverseMap();
CreateMap<ReadingQuestionTrial, ReadingReportDto>()

View File

@ -14,7 +14,17 @@ namespace IRaCIS.Core.Domain.Models
public class SegmentBinding : BaseFullDeleteAuditEntity
{
#region 导航属性
[JsonIgnore]
[Comment("分割分组")]
[ForeignKey("SegmentationId")]
public Segmentation Segmentation { get; set; }
[JsonIgnore]
[Comment("分割")]
[ForeignKey("SegmentId")]
public Segment Segment { get; set; }
#endregion
/// <summary>