Created
December 18, 2024 09:16
-
-
Save maor365scores/871ddc5a8a109fdc9e2d3f3705e38515 to your computer and use it in GitHub Desktop.
dsd
This file contains hidden or 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
| using System.Text; | |
| using Scanners.Common.ExtensionMethods; | |
| namespace SportsApi.Models; | |
| public class OutrightResponse | |
| { | |
| public OutrightItem[] Items { get; set; } | |
| public int Count { get; set; } | |
| public Links OutrightsLinks { get; set; } | |
| public string Type { get; set; } | |
| public class Links | |
| { | |
| public string Next { get; set; } | |
| } | |
| public class OutrightItem | |
| { | |
| public ItemId Id { get; set; } | |
| public ItemName Name { get; set; } | |
| public int Version { get; set; } | |
| public DateTime StartDateUtc { get; set; } | |
| public DateTime CutOffDateUtc { get; set; } | |
| public bool IsInPlay { get; set; } | |
| public bool IsDisplayed { get; set; } | |
| public bool IsOpenForBetting { get; set; } | |
| public bool IsPlannedInPlay { get; set; } | |
| public string State { get; set; } | |
| public string Type { get; set; } | |
| public Competition Competition { get; set; } | |
| public ItemRegion Region { get; set; } | |
| public string ParticipantType { get; set; } | |
| public Participant[] Participants { get; set; } | |
| public ItemMarket[] Markets { get; set; } | |
| } | |
| public class ItemId | |
| { | |
| public string Full { get; set; } | |
| public int EntityId { get; set; } | |
| } | |
| public class ItemName : Name | |
| { | |
| public string Sign { get; set; } | |
| public string ShortTextSign { get; set; } | |
| public override string ToString() | |
| { | |
| return $"Text: {Text}, ShortText: {ShortText}, Sign: {Sign}, ShortTextSign: {ShortTextSign}"; | |
| } | |
| } | |
| public class Competition | |
| { | |
| public int Id { get; set; } | |
| public Name Name { get; set; } | |
| } | |
| public class Name | |
| { | |
| public string Text { get; set; } | |
| public string ShortText { get; set; } | |
| } | |
| public class ItemRegion | |
| { | |
| public int Id { get; set; } | |
| public Name Name { get; set; } | |
| } | |
| public class Participant | |
| { | |
| public int Id { get; set; } | |
| public Name Name { get; set; } | |
| } | |
| public class ItemMarket | |
| { | |
| public int Id { get; set; } | |
| public ItemName Name { get; set; } | |
| public string MarketType { get; set; } | |
| public string MarketSubType { get; set; } | |
| public bool IsDisplayed { get; set; } | |
| public bool IsOpenForBetting { get; set; } | |
| public bool IsBalancedLine { get; set; } | |
| public Option[] Options { get; set; } | |
| public bool IsEachwayEnabled { get; set; } | |
| public string Terms { get; set; } | |
| public int Places { get; set; } | |
| public string GenerateTag() | |
| { | |
| var sb = new StringBuilder(); | |
| sb.AppendIfNotNull("marketId", Id.ToString()); | |
| sb.AppendIfNotNull("marketName", Name.Text); | |
| sb.AppendIfNotNull("marketType", MarketType); | |
| return sb.ToString().TrimEnd(' ', ';'); | |
| } | |
| } | |
| public class Option | |
| { | |
| public int Id { get; set; } | |
| public ItemName Name { get; set; } | |
| public Price Price { get; set; } | |
| public bool IsDisplayed { get; set; } | |
| public bool IsOpenForBetting { get; set; } | |
| } | |
| public class Price | |
| { | |
| public Fraction Fraction { get; set; } | |
| public float Odds { get; set; } | |
| public int UsOdds { get; set; } | |
| public override string ToString() | |
| { | |
| return $"Fraction: {Fraction}, Odds: {Odds}, UsOdds: {UsOdds}"; | |
| } | |
| } | |
| public class Fraction | |
| { | |
| public int Numerator { get; set; } | |
| public int Denominator { get; set; } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment