Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuildingBlocks: Extend Dto with BaseDto #66

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class NodeBaseDto(
int importance,
string phase,
List<string> categories,
List<string> tags) // todo: Refactor this so that it extends NodeBaseDto
List<string> tags)
{
[JsonPropertyName("id")] public string? Id { get; } = id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,7 @@ public class NodeDto(
int importance,
string phase,
List<string> categories,
List<string> tags)
List<string> tags) : NodeBaseDto(id, title, description, timestamp, importance, phase, categories, tags)
{
[JsonPropertyName("id")] public string? Id { get; } = id;

[JsonPropertyName("title")] public string Title { get; } = title;

[JsonPropertyName("description")] public string Description { get; } = description;

[JsonPropertyName("timestamp")] public DateTime Timestamp { get; } = timestamp;

[JsonPropertyName("importance")] public int Importance { get; } = importance;

[JsonPropertyName("phase")] public string Phase { get; } = phase;

[JsonPropertyName("categories")] public List<string> Categories { get; } = categories;

[JsonPropertyName("tags")] public List<string> Tags { get; } = tags;

[JsonPropertyName("reminders")] public List<ReminderBaseDto> Reminders { get; } = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,7 @@ public class ReminderDto(
int priority,
DateTime notificationTime,
string status,
NodeBaseDto node) // todo: Refactor this so that it extends ReminderBaseDto
NodeBaseDto node) : ReminderBaseDto(id, title, description, dueDateTime, priority, notificationTime, status)
{
[JsonPropertyName("id")] public string? Id { get; } = id;

[JsonPropertyName("title")] public string Title { get; } = title;

[JsonPropertyName("description")] public string Description { get; } = description;

[JsonPropertyName("dueDateTime")] public DateTime DueDateTime { get; } = dueDateTime;

[JsonPropertyName("priority")] public int Priority { get; } = priority;

[JsonPropertyName("notificationTime")] public DateTime NotificationTime { get; } = notificationTime;

[JsonPropertyName("status")] public string Status { get; } = status;

[JsonPropertyName("node")] public NodeBaseDto Node { get; set; } = node;
}