mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 19:00:07 +01:00
feat: basic category controller (create & retrieve)
This commit is contained in:
19
Mapping/CategoryMapping.cs
Normal file
19
Mapping/CategoryMapping.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using QuotifyBE.DTOs;
|
||||
using QuotifyBE.Entities;
|
||||
|
||||
namespace QuotifyBE.Mapping;
|
||||
|
||||
public static class CategoryMapping
|
||||
{
|
||||
public static CategoryShortDTO ToCategoryShortDTO(this Category category)
|
||||
{
|
||||
|
||||
return new CategoryShortDTO
|
||||
{
|
||||
Id = category.Id,
|
||||
Name = category.Name,
|
||||
Description = category.Description,
|
||||
CreatedAt = category.CreatedAt
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user