yavsc/Yavsc.Server/Models/Identity/GoogleCloudMobileDeclaration.cs

44 lines
1.2 KiB
C#
Raw Normal View History

2016-07-27 10:55:44 +02:00
using System;
2016-05-17 18:22:18 +02:00
using System.ComponentModel.DataAnnotations;
2016-07-19 15:44:36 +02:00
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
2016-05-17 18:22:18 +02:00
2016-07-19 15:44:36 +02:00
namespace Yavsc.Models.Identity
{
2017-02-07 15:04:58 +01:00
[JsonObject]
2016-07-19 15:44:36 +02:00
public class GoogleCloudMobileDeclaration {
2017-05-27 16:22:58 +02:00
2016-07-19 15:44:36 +02:00
[Required]
2016-07-03 23:57:33 +02:00
public string GCMRegistrationId { get; set; }
2017-05-27 16:22:58 +02:00
2016-07-19 15:44:36 +02:00
[Key,Required]
2016-07-03 23:57:33 +02:00
public string DeviceId { get; set; }
2016-07-19 15:44:36 +02:00
2016-07-03 23:57:33 +02:00
public string Model { get; set; }
public string Platform { get; set; }
public string Version { get; set; }
2016-07-19 15:44:36 +02:00
public string DeviceOwnerId { get; set; }
2016-07-27 10:55:44 +02:00
public DateTime DeclarationDate { get; set; }
2018-05-02 04:09:51 +02:00
/// <summary>
/// Latest Activity Update
///
/// Let's says,
/// the latest time this device downloaded functional info from server
/// activity list, let's say, promoted ones, those thar are at index, and
/// all others, that are not listed as unsupported ones (not any more, after
/// has been annonced as obsolete a decent laps of time).
///
/// In order to say, is any activity has changed here.
/// </summary>
/// <returns></returns>
public DateTime LatestActivityUpdate { get; set; }
2016-07-20 13:52:38 +02:00
[JsonIgnore,ForeignKey("DeviceOwnerId")]
2017-05-27 16:22:58 +02:00
public virtual ApplicationUser DeviceOwner { get; set; }
2017-02-06 17:31:35 +01:00
2016-07-19 15:44:36 +02:00
}
2016-05-17 18:22:18 +02:00
}