namespace SJZY.Track.Application.Contract.Dtos.Demo { /// /// automapper 复杂转换样例 /// public class ComplexAutomapperDemoInput { /// /// 编号 /// public int Id { get; set; } /// /// 操作类型 /// public OptionType OptionType { get; set; } /// /// 描述 /// public string Description { get; set; } /// /// 性别 /// public Gender Gender { get; set; } /// /// 用户信息 /// public UserInfoInput UserInfo { get; set; } /// /// 用户角色 /// public List UserRoleInputList { get; set; } /// /// 拓展演示,目前大家共同约定,暂时不使用充血模型 /// /// public string GetAddress() { return "辽宁省沈阳市..."; } } public class ComplexAutomapperDemoOutput { /// /// 编号 /// public int Id { get; set; } /// /// 性别 /// public string Gender { get; set; } /// /// 描述 /// public string Description { get; set; } /// /// 年龄 /// public int Age { get; set; } /// /// qq号码 /// public string QQ { get; set; } /// /// 地址 /// public string Address { get; set; } /// /// 角色编号 /// public int[] RoleIds { get; set; } } }