Skip to content

Instantly share code, notes, and snippets.

@joshperry
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshperry/01ab86f4b81d8efede3f to your computer and use it in GitHub Desktop.
Save joshperry/01ab86f4b81d8efede3f to your computer and use it in GitHub Desktop.
public class Episode
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[Indexed]
public int SubscriptionId { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string Content { get; set; }
public string Guid { get; set; }
public DateTime PublishedDate { get; set; }
public double Length { get; set; }
public Boolean Explicit { get; set; }
public double CurrentPosition { get; set; }
public string UriServer { get; set; }
public string UriLocal { get; set; }
public string StatusPlay { get; set; }
public string StatusFile { get; set; }
public DateTime FinishedOn { get; set; }
}
public class Download
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[Indexed]
public int EpisodeId { get; set; }
private Episode _episode = null;
[Ignore]
public Episode Episode {
get {
return _episode ?? (_episode = App.db.GetAsync<Episode>(EpisodeId).Result);
}
set {
if(value.Id != EpisodeId)
EpisodeId = value.Id
_episode = value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment