diff --git a/api/DTOs/PersonRequestDto.cs b/api/DTOs/PersonRequestDto.cs new file mode 100644 index 0000000..e70c420 --- /dev/null +++ b/api/DTOs/PersonRequestDto.cs @@ -0,0 +1,8 @@ +namespace api.DTOs; + +public class PersonRequestDto +{ + public string Username { get; set; } + public string RealName { get; set; } + public DateOnly Birthday { get; set; } +} \ No newline at end of file diff --git a/api/DTOs/PersonResponseDto.cs b/api/DTOs/PersonResponseDto.cs new file mode 100644 index 0000000..074820c --- /dev/null +++ b/api/DTOs/PersonResponseDto.cs @@ -0,0 +1,8 @@ +namespace api.DTOs; + +public class PersonResponseDto +{ + public string Username { get; set; } + public string RealName { get; set; } + public DateOnly Birthday { get; set; } +} \ No newline at end of file diff --git a/api/Services/IPersonService.cs b/api/Services/IPersonService.cs new file mode 100644 index 0000000..c7aa1e6 --- /dev/null +++ b/api/Services/IPersonService.cs @@ -0,0 +1,13 @@ +using api.DTOs; + +namespace api.Services +{ + public interface IPersonService + { + Task> GetAllPersonsAsync(); + Task GetPersonByIdAsync(int id); + Task AddPersonAsync(PersonRequestDto PersonDto); + Task UpdatePersonAsync(int id, PersonRequestDto PersonDto); + Task DeletePersonAsync(int id); + } +} \ No newline at end of file