Adding Admin API
This commit is contained in:
20
src/api/MicCheck.Api/Organizations/OrganizationResponse.cs
Normal file
20
src/api/MicCheck.Api/Organizations/OrganizationResponse.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace MicCheck.Api.Organizations;
|
||||
|
||||
public record OrganizationResponse(
|
||||
int Id,
|
||||
string Name,
|
||||
DateTimeOffset CreatedAt
|
||||
)
|
||||
{
|
||||
public static OrganizationResponse From(Organization org) => new(
|
||||
org.Id, org.Name, org.CreatedAt);
|
||||
}
|
||||
|
||||
public record OrganizationMemberResponse(
|
||||
int UserId,
|
||||
string Role
|
||||
)
|
||||
{
|
||||
public static OrganizationMemberResponse From(OrganizationUser member) => new(
|
||||
member.UserId, member.Role.ToString());
|
||||
}
|
||||
Reference in New Issue
Block a user