Last active
August 29, 2015 14:10
-
-
Save grappster/e39a726d7d2d1afe5a87 to your computer and use it in GitHub Desktop.
Your App Model
This file contains 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; | |
using System.Collections.Generic; | |
namespace Grappster.Core.ExternalDomain | |
{ | |
/// NOTE: All string dates must have the fomrat "yyyy-MM-dd hh:mm" | |
/// <summary> | |
/// Generic message. Not loaded into Grappster but can be used to debug when testing your endpoint | |
/// </summary> | |
public class Message | |
{ | |
public string Msg { get; set; } | |
} | |
/// <summary> | |
/// Client container. | |
/// Contains a list of your clients in your system. | |
/// </summary> | |
public class Clients | |
{ | |
public List<Client> ClientList { get; set; } | |
} | |
/// <summary> | |
/// Each client record MUST contain | |
/// Name - Name of the client in your system | |
/// ExternalClientId - Unique ID of the client in your system (NOTE: very important it's unique) | |
/// CreatedAt - Date when the client was created in your system, Format: "yyyy-MM-dd hh:mm" | |
/// </summary> | |
public class Client | |
{ | |
public string Name { get; set; } | |
public string ExternalClientId { get; set; } | |
public string CreatedAt { get; set; } | |
} | |
/// <summary> | |
/// Container for history client specific counter records | |
/// Name - the name of the data. eg. Payslips | |
/// ClientCounterRecords - List of records | |
/// </summary> | |
public class ClientCounterHistory | |
{ | |
public string Name { get; set; } | |
public List<ClientCounterHistoryRecord> ClientCounterRecords { get; set; } | |
} | |
/// <summary> | |
/// Client specific history counter record: | |
/// ExternalClientId - Id of the client in your system. (matched with the one recived in the Client model) | |
/// CreatedAt - Date of the value. eg. If there was 3 Payslips created on 21 February 2014 then that date should be set here. | |
/// Value - The data count for a particular date. | |
/// </summary> | |
public class ClientCounterHistoryRecord | |
{ | |
public string ExternalClientId { get; set; } | |
public string CreatedAt { get; set; } | |
public decimal Value { get; set; } | |
} | |
/// <summary> | |
/// Container for client specific daily counter records. | |
/// Name - The name of the data. eg. Payslips | |
/// ClientCounterRecords - List of daily records | |
/// </summary> | |
public class ClientCounterNow | |
{ | |
public string Name { get; set; } | |
public List<ClientCounterNowRecord> ClientCounterRecords { get; set; } | |
} | |
/// <summary> | |
/// Client specific counter record. | |
/// ExternalClientId - Id of the client in your system. (matched with the one recived in the Client model) | |
/// Value - The data count for the date of the call. | |
/// </summary> | |
public class ClientCounterNowRecord | |
{ | |
public string ExternalClientId { get; set; } | |
public decimal Value { get; set; } | |
} | |
/// <summary> | |
/// Global daily counter record. | |
/// Name - The name of the data eg. Payslips | |
/// Value - The total count/value for the date of the call. | |
/// </summary> | |
public class GlobalCounterNow | |
{ | |
public string Name { get; set; } | |
public decimal Value { get; set; } | |
} | |
/// <summary> | |
/// Global counter record for history | |
/// Name - The name of the data eg. Payslips | |
/// GlobalCounterRecords - list of values for the specified dates. | |
/// </summary> | |
public class GlobalCounterHistory | |
{ | |
public string Name { get; set; } | |
public List<GlobalCounterHistoryRecord> GlobalCounterRecords { get; set; } | |
} | |
/// <summary> | |
/// Global history record. | |
/// CreatedAt - Date of the value. eg. If there was 3 Payslips created on 21 February 2014 then that date should be set here. | |
/// Value - The record value of the specific date. | |
/// </summary> | |
public class GlobalCounterHistoryRecord | |
{ | |
public string CreatedAt { get; set; } | |
public decimal Value { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment