Skip to content

Commit

Permalink
Add for notify
Browse files Browse the repository at this point in the history
  • Loading branch information
cesxhin committed Oct 15, 2023
1 parent a9efe31 commit 05d7755
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Cesxhin.AnimeManga.Domain.DTO
{
public class NotifyDTO
public class NotifyAnimeDTO
{
public string Message { get; set; }
public string Image { get; set; }
Expand Down
8 changes: 8 additions & 0 deletions src/Cesxhin.AnimeManga.Domain/DTO/NotifyMangaDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Cesxhin.AnimeManga.Domain.DTO
{
public class NotifyMangaDTO
{
public string Message { get; set; }
public string Image { get; set; }
}
}
8 changes: 8 additions & 0 deletions src/Cesxhin.AnimeManga.Domain/DTO/NotifyRequestAnimeDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Cesxhin.AnimeManga.Domain.DTO
{
public class NotifyRequestAnimeDTO
{
public string Message { get; set; }
public string Image { get; set; }
}
}
8 changes: 8 additions & 0 deletions src/Cesxhin.AnimeManga.Domain/DTO/NotifyRequestMangaDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Cesxhin.AnimeManga.Domain.DTO
{
public class NotifyRequestMangaDTO
{
public string Message { get; set; }
public string Image { get; set; }
}
}
48 changes: 48 additions & 0 deletions src/Cesxhin.AnimeManga.Domain/Models/GenericNotify.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
namespace Cesxhin.AnimeManga.Domain.DTO
{
public class GenericNotify
{
public string Message { get; set; }
public string Image { get; set; }

//convert NotifyAnimeDTO to GenericNotify
public static GenericNotify NotifyAnimeDTOToGenericNotify(NotifyAnimeDTO notify)
{
return new GenericNotify
{
Message = notify.Message,
Image = notify.Image
};
}

//convert NotifyMangaDTO to GenericNotify
public static GenericNotify NotifyMangaDTOToGenericNotify(NotifyMangaDTO notify)
{
return new GenericNotify
{
Message = notify.Message,
Image = notify.Image
};
}

//convert NotifyRequestAnimeDTO to GenericNotify
public static GenericNotify NotifyRequestAnimeDTOToGenericNotify(NotifyRequestAnimeDTO notify)
{
return new GenericNotify
{
Message = notify.Message,
Image = notify.Image
};
}

//convert NotifyRequestMangaDTO to GenericNotify
public static GenericNotify NotifyRequestMangaDTOToGenericNotify(NotifyRequestMangaDTO notify)
{
return new GenericNotify
{
Message = notify.Message,
Image = notify.Image
};
}
}
}

0 comments on commit 05d7755

Please sign in to comment.