using Abp.Application.Services.Dto;
namespace MyCompany.MyProject.PlayerApp.Dto
{
public class PlayerDto : EntityDto<long>
{
public long PlayerID { get; set; }
public string PlayerName { get; set; }
public long MapID { get; set; }
}
}
PlayerInput.cs
using Abp.Application.Services.Dto;
using Abp.Runtime.Validation;
using System.ComponentModel.DataAnnotations;
namespace MyCompany.MyProject.PlayerApp.Dto
{
public class PlayerInput : IInputDto
{
public long PlayerID { get; set; }
public string PlayerName { get; set; }
public long MapID { get; set; }
}
public class GetPlayerInput : IInputDto
{
public string PlayerName { get; set; }
public long MapID { get; set; }
}
public class CreatePlayerInput : IInputDto, IShouldNormalize
{
[Required]
public string PlayerName { get; set; }
public long MapID { get; set; }
public void Normalize()
{
if (MapID == 0)
{
MapID = 1;
}
}
}
}
using Abp.Application.Services.Dto;
using System.Collections.Generic;
namespace MyCompany.MyProject.PlayerApp.Dto
{
public class PlayerOutput : IOutputDto
{
public long MapID { get; set; }
public string PlayerName { get; set; }
}
public class GetPlayersOutput : IOutputDto
{
public List<PlayerDto> Players { get; set; }
}
}