Skip to content

Instantly share code, notes, and snippets.

@jgable
Created March 24, 2011 14:42
Show Gist options
  • Save jgable/885167 to your computer and use it in GitHub Desktop.
Save jgable/885167 to your computer and use it in GitHub Desktop.
TeamResponses - For the Team Demo at Hackatopia
using System;
using System.Collections.Generic;
/// <summary>
/// Our Hello response object; /Index action
/// </summary>
public class HelloWorldResponse
{
public bool Success { get; set; }
public DateTime Time { get; set; }
public string Message { get; set; }
}
/// <summary>
/// Team information; copied from Web project Models.
/// </summary>
public class Team
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Captain { get; set; }
public List<string> MemberNames { get; set; }
public Team()
{
MemberNames = new List<string>();
}
}
/// <summary>
/// Our Team List info; /List Action
/// </summary>
public class TeamListResponse
{
public bool Success { get; set; }
public List<Team> Teams { get; set; }
}
/// <summary>
/// Our Single Team info; /Id/1 Action
/// </summary>
public class TeamGetResponse
{
public bool Success { get; set; }
public Team Team { get; set; }
}
/// <summary>
/// Our Search response info; /Search/blah
/// </summary>
public class TeamSearchResponse
{
public bool Success { get; set; }
public List<Team> Teams { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment