Skip to content

Instantly share code, notes, and snippets.

@ChrisTowles
Created March 1, 2016 15:29
Show Gist options
  • Save ChrisTowles/aa0e102d17eb2fb19e62 to your computer and use it in GitHub Desktop.
Save ChrisTowles/aa0e102d17eb2fb19e62 to your computer and use it in GitHub Desktop.
Azure Mobile Sync Model - Client
using Microsoft.WindowsAzure.MobileServices;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Ecrumbs.Shared.Models
{
public class ActivityProfile
{
public string AccountId { get; set; }
public string ProfileName { get; set; }
public string StartMessage { get; set; }
public string EndMessage { get; set; }
public int ActivityTypeId { get; set; }
#region System properties
public string Id { get; set; }
public DateTimeOffset? CreatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }
public bool Deleted { get; set; }
//[JsonProperty(PropertyName = "__version")]
[Version]
public string Version { get; set; }
#endregion
public ActivityProfile()
{
}
public ActivityProfile( string profileName, int activityTypeId, string startMessage = "Going for a run.", string endMessage = "I crushed it.")
{
Id = Guid.NewGuid().ToString("N");
ProfileName = profileName;
ActivityTypeId = activityTypeId;
StartMessage = startMessage;
EndMessage = endMessage;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment