| | | 1 | | using System.Text.Json; |
| | | 2 | | |
| | | 3 | | namespace Syki.Back.Features.Notifications.GetNotifications; |
| | | 4 | | |
| | | 5 | | public class GetNotificationsOut : IApiDto<GetNotificationsOut> |
| | | 6 | | { |
| | 0 | 7 | | public int Total { get; set; } |
| | 0 | 8 | | public int Page { get; set; } |
| | 0 | 9 | | public int PageSize { get; set; } |
| | 0 | 10 | | public List<GetNotificationsItemOut> Items { get; set; } = []; |
| | | 11 | | |
| | | 12 | | public static IEnumerable<(string, GetNotificationsOut)> GetExamples() => |
| | 0 | 13 | | [ |
| | 0 | 14 | | ("Exemplo", new GetNotificationsOut() |
| | 0 | 15 | | { |
| | 0 | 16 | | Total = 1, |
| | 0 | 17 | | Page = 1, |
| | 0 | 18 | | PageSize = 20, |
| | 0 | 19 | | Items = |
| | 0 | 20 | | [ |
| | 0 | 21 | | new GetNotificationsItemOut |
| | 0 | 22 | | { |
| | 0 | 23 | | Id = 1, |
| | 0 | 24 | | NotificationType = NotificationType.NewClassActivity, |
| | 0 | 25 | | Title = "Nova atividade de classe", |
| | 0 | 26 | | Description = "Uma nova atividade foi adicionada à sua turma.", |
| | 0 | 27 | | CreatedAt = new DateTime(2026, 1, 1, 12, 0, 0), |
| | 0 | 28 | | ViewedAt = null, |
| | 0 | 29 | | }, |
| | 0 | 30 | | ], |
| | 0 | 31 | | }), |
| | 0 | 32 | | ]; |
| | | 33 | | } |
| | | 34 | | |
| | | 35 | | public class GetNotificationsItemOut |
| | | 36 | | { |
| | | 37 | | public int Id { get; set; } |
| | | 38 | | public NotificationType NotificationType { get; set; } |
| | | 39 | | public string Title { get; set; } |
| | | 40 | | public string Description { get; set; } |
| | | 41 | | public DateTime CreatedAt { get; set; } |
| | | 42 | | public DateTime? ViewedAt { get; set; } |
| | | 43 | | public JsonDocument? Metadata { get; set; } |
| | | 44 | | } |