Skip to content

Instantly share code, notes, and snippets.

@kawazoe
Created May 18, 2015 17:14
Show Gist options
  • Save kawazoe/84cb119b023b9e92f36c to your computer and use it in GitHub Desktop.
Save kawazoe/84cb119b023b9e92f36c to your computer and use it in GitHub Desktop.
xprs-io - Main data structure proposition
public class User
{
public Guid Id { get; set; }
public Member Member { get; set; }
// authentication data
}
public class Member
{
public Guid Id { get; set; }
public User User { get; set; }
public Participant[] Aliases { get; set; }
public Subscription[] Donations { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public string Culture { get; set; }
public DateTime Birthdate { get; set; }
public DateTime Created { get; set; }
}
public class Participant
{
public Guid Id { get; set; }
public Community Community { get; set; }
public Member Member { get; set; }
public string Alias { get; set; }
public Subscription CurrentSubscription { get; set; }
public Subscription[] PastSubscriptions { get; set; }
public DateTime Created { get; set; }
}
public class Owner
{
public Guid Id { get; set; }
public Participant Participant { get; set; }
public float Share { get; set; }
}
public class Community
{
public Guid Id { get; set; }
public Community Parent { get; set; }
public Community[] Children { get; set; }
public Owner[] Owners { get; set; }
public Tag[] Tags { get; set; }
public string Name { get; set; }
public string Url { get; set; }
public string Description { get; set; }
public DateTime Created { get; set; }
public DateTime Modified { get; set; }
}
public class Contribution
{
public Guid Id { get; set; }
public Community Community { get; set; }
public Participant Creator { get; set; }
public Owner[] Owners { get; set; }
public Milestone[] Milestones { get; set; }
public Subscription Deal { get; set; }
public Tag[] Tags { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public DateTime Created { get; set; }
public DateTime Modified { get; set; }
}
public class Milestone
{
public Guid Id { get; set; }
public Contribution Contribution { get; set; }
public Version[] Versions { get; set; }
public Tag[] Tags { get; set; }
public string Name { get; set; }
public DateTime Created { get; set; }
public DateTime Modified { get; set; }
}
public class Version
{
public Guid Id { get; set; }
public Milestone Milestone { get; set; }
public string Descriptor { get; set; }
public DateTime Created { get; set; }
public string FileDescriptor { get; set; }
}
public class Subscription
{
public Guid Id { get; set; }
public SubscriptionType Type { get; set; }
public DateTime Created { get; set; }
public DateTime? Expire { get; set; }
// payment data
}
// Donation
// Monthly
// Commission
public class SubscriptionType
{
public Guid Id { get; set; }
public string Name { get; set; }
}
public class Tag
{
public Guid Id { get; set; }
public Tag Parent { get; set; }
public Tag[] Children { get; set; }
public string Name { get; set; }
}
public class Likes
{
public Participant Participant { get; set; }
public Contribution Contribution { get; set; }
public DateTime Created { get; set; }
}
public class Comments
{
public Participant Participant { get; set; }
public Contribution Contribution { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public DateTime Created { get; set; }
public DateTime Modified { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment