namespace SafeCampus.Application.Services.Business.MajorService; public class MajorDto { public long? Id { get; set; } /// /// 专业名称 /// public string Name { get; set; } /// /// 专业编码 /// public string Code { get; set; } /// /// 专业简介 /// public string Introduce { get; set; } /// /// 院系id /// public long DepId { get; set; } /// /// 排序 /// public int Sort { get; set; } public string DepartmentName { get; set; } } public class MajorDtoMapper : IRegister { public void Register(TypeAdapterConfig config) { config.ForType() .Map(x => x.DepartmentName, x => x.DepartmentInfoItem.Name); } }