-
-
Save glennblock/4367210 to your computer and use it in GitHub Desktop.
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
namespace IssueDOM | |
{ | |
public class Issue | |
{ | |
public string Title { get; set; } | |
public string Description { get; set; } | |
public string State { get; set; } | |
//another option instead of generic link / rel is to just model them into the domain, for example for people you could | |
have a Person entity with the properties of a person. The spec defines what that means. | |
public Person[] People { get; set; } | |
//Isn't the fact that it is there a proof it's available? | |
public Link[] StateTransitions { get; set; } | |
public string[] Tags { get; set; } // Simple boolean tags | |
//don't like this name. If it's category, let's just call it category | |
public Category[] Categories { get; set; } // Selected values with a predefined domain | |
//can we call this just properties? | |
public KeyValuePair<string, string> Properties { get; set; } // Arbitrary key value pairs | |
public string[] Comments { get; set; } | |
public Event[] History { get; set; } | |
public Document[] Documents { get; set; } | |
} | |
//do we really need this at all. If we are making a new media type let's just back links in a domain specific fashion. | |
public class Link { | |
public string Rel { get; set; } | |
public string Href { get; set; } | |
public string Title { get; set; } | |
} | |
public class Comment { | |
public Link Author { get; set; } | |
public string Text { get; set; } | |
} | |
public class Category | |
{ | |
public string Name { get; set; } | |
public string Value { get; set; } | |
public Link Domain { get; set; } | |
} | |
public class Event { | |
public DateTime When { get; set; } | |
public Link Who { get; set; } | |
public string What { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment