/// This file is a part of RSS Bot for Telegram. /// License: MIT /// Author: CrazyHackGUT aka Kruzya (Sergey Gut) /// using System; using System.ComponentModel.DataAnnotations; namespace Kruzya.TelegramBot.RichSiteSummary.Data { /// /// Represents a subscription in database. /// public class Subscriber { /// /// The unique Subscription identifier. /// [Key] public Guid SubscriptionId { get; set; } /// /// The Telegram subscriber id. /// [Required] public Int64 SubscriberId { get; set; } /// /// Unique feed identifier related with this Subscription. Identifies what user is read. /// public Guid FeedId { get; set; } /// /// Feed related with this Subscription. Identifies what user is read. /// [Required] public virtual Feed Feed { get; set; } /// /// When user is subscribed on this feed. /// [Required] public DateTime SubscribedAt { get; set; } public Subscriber() { SubscriptionId = new Guid(); SubscribedAt = DateTime.Now; } public Subscriber(Feed feed) : base() { Feed = feed; } } }