-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update from Anime-Manga/references@bbeb523
- Loading branch information
Anime-Manga
committed
Oct 14, 2023
1 parent
eda317e
commit 6320502
Showing
5 changed files
with
115 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/references/Cesxhin.AnimeManga.Domain/DTO/GenericQueueDTO.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Cesxhin.AnimeManga.Domain.Models; | ||
using System; | ||
|
||
namespace Cesxhin.AnimeManga.Domain.DTO | ||
{ | ||
public class GenericQueueDTO | ||
{ | ||
public string Url { get; set; } | ||
public string NameCfg { get; set; } | ||
public long TimeRequest { get; set; } = ((DateTimeOffset)DateTime.UtcNow).ToUnixTimeMilliseconds(); | ||
|
||
//convert ChapterQueue to GenericQueueDTO | ||
public static GenericQueueDTO ChapterQueueToGenericQueueDTO(ChapterQueue queue) | ||
{ | ||
return new GenericQueueDTO | ||
{ | ||
Url = queue.Url, | ||
NameCfg = queue.NameCfg, | ||
TimeRequest = queue.TimeRequest | ||
}; | ||
} | ||
|
||
//convert EpisodeQueue to GenericQueueDTO | ||
public static GenericQueueDTO EpisodeQueueToGenericQueueDTO(EpisodeQueue queue) | ||
{ | ||
return new GenericQueueDTO | ||
{ | ||
Url = queue.Url, | ||
NameCfg = queue.NameCfg, | ||
TimeRequest = queue.TimeRequest | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/references/Cesxhin.AnimeManga.Domain/Models/ChapterQueue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Cesxhin.AnimeManga.Domain.DTO; | ||
using RepoDb.Attributes; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Cesxhin.AnimeManga.Domain.Models | ||
{ | ||
[Map("chapterqueue")] | ||
public class ChapterQueue | ||
{ | ||
[Primary] | ||
[Map("url")] | ||
public string Url { get; set; } | ||
|
||
[Primary] | ||
[Map("namecfg")] | ||
public string NameCfg { get; set; } | ||
|
||
[Map("timerequest")] | ||
public long TimeRequest { get; set; } | ||
|
||
|
||
//convert GenericQueueDTO to ChapterQueue | ||
public static ChapterQueue GenericQueueDTOToChapterQueue(GenericQueueDTO queue) | ||
{ | ||
return new ChapterQueue | ||
{ | ||
Url = queue.Url, | ||
NameCfg = queue.NameCfg, | ||
TimeRequest = queue.TimeRequest | ||
}; | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/references/Cesxhin.AnimeManga.Domain/Models/EpisodeQueue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Cesxhin.AnimeManga.Domain.DTO; | ||
using RepoDb.Attributes; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Cesxhin.AnimeManga.Domain.Models | ||
{ | ||
[Map("episodequeue")] | ||
public class EpisodeQueue | ||
{ | ||
[Primary] | ||
[Map("url")] | ||
public string Url { get; set; } | ||
|
||
[Primary] | ||
[Map("namecfg")] | ||
public string NameCfg { get; set; } | ||
|
||
[Map("timerequest")] | ||
public long TimeRequest { get; set; } | ||
|
||
//convert GenericQueueDTO to EpisodeQueue | ||
public static EpisodeQueue GenericQueueDTOToEpisodeQueue(GenericQueueDTO queue) | ||
{ | ||
return new EpisodeQueue | ||
{ | ||
Url = queue.Url, | ||
NameCfg = queue.NameCfg, | ||
TimeRequest = queue.TimeRequest | ||
}; | ||
} | ||
} | ||
} |