mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
56 lines
1.4 KiB
C#
56 lines
1.4 KiB
C#
// This file is a part of RSS Bot for Telegram.
|
|
// License: MIT
|
|
// Author: CrazyHackGUT aka Kruzya (Sergey Gut) <kruzefag@gmail.com>
|
|
//
|
|
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Kruzya.TelegramBot.RichSiteSummary.Data
|
|
{
|
|
/// <summary>
|
|
/// Represents a subscription in database.
|
|
/// </summary>
|
|
public class Subscriber
|
|
{
|
|
/// <summary>
|
|
/// The unique Subscription identifier.
|
|
/// </summary>
|
|
[Key]
|
|
public Guid SubscriptionId { get; set; }
|
|
|
|
/// <summary>
|
|
/// The Telegram subscriber id.
|
|
/// </summary>
|
|
[Required]
|
|
public Int64 SubscriberId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Unique feed identifier related with this Subscription. Identifies what user is read.
|
|
/// </summary>
|
|
public Guid FeedId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Feed related with this Subscription. Identifies what user is read.
|
|
/// </summary>
|
|
[Required]
|
|
public virtual Feed Feed { get; set; }
|
|
|
|
/// <summary>
|
|
/// When user is subscribed on this feed.
|
|
/// </summary>
|
|
[Required]
|
|
public DateTime SubscribedAt { get; set; }
|
|
|
|
public Subscriber()
|
|
{
|
|
SubscriptionId = new Guid();
|
|
SubscribedAt = DateTime.Now;
|
|
}
|
|
|
|
public Subscriber(Feed feed) : base()
|
|
{
|
|
Feed = feed;
|
|
}
|
|
}
|
|
} |