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