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