From a6150c487e7a0eb3fb1d9874d2fa7de61cdbfd30 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 27 Apr 2021 19:29:20 +0800 Subject: refactor: ... --- .../Timeline/Services/User/IBasicUserService.cs | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 BackEnd/Timeline/Services/User/IBasicUserService.cs (limited to 'BackEnd/Timeline/Services/User/IBasicUserService.cs') diff --git a/BackEnd/Timeline/Services/User/IBasicUserService.cs b/BackEnd/Timeline/Services/User/IBasicUserService.cs new file mode 100644 index 00000000..0e30d733 --- /dev/null +++ b/BackEnd/Timeline/Services/User/IBasicUserService.cs @@ -0,0 +1,36 @@ +using System; +using System.Threading.Tasks; + +namespace Timeline.Services.User +{ + /// + /// This service provide some basic user features, which should be used internally for other services. + /// + public interface IBasicUserService + { + /// + /// Check if a user exists. + /// + /// The id of the user. + /// True if exists. Otherwise false. + Task CheckUserExistenceAsync(long id); + + /// + /// Get the user id of given username. + /// + /// Username of the user. + /// The id of the user. + /// Thrown when is null. + /// Thrown when is of bad format. + /// Thrown when the user with given username does not exist. + Task GetUserIdByUsernameAsync(string username); + + /// + /// Get the username modified time of a user. + /// + /// User id. + /// The time. + /// Thrown when user does not exist. + Task GetUsernameLastModifiedTimeAsync(long userId); + } +} -- cgit v1.2.3