mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
well, it's generated column
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Kruzya.TelegramBot.RichSiteSummary.UrchinTrackingModule;
|
using Kruzya.TelegramBot.RichSiteSummary.UrchinTrackingModule;
|
||||||
using Telegram.Bot.Types.Enums;
|
using Telegram.Bot.Types.Enums;
|
||||||
@@ -84,10 +85,10 @@ public class Post : RepresentableEntity
|
|||||||
public DateTime ReceivedAt { get; set; }
|
public DateTime ReceivedAt { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// SHA256
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
[MaxLength(64)]
|
[MaxLength(64)]
|
||||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||||
public string UrlHash { get; set; }
|
public string UrlHash { get; set; }
|
||||||
|
|
||||||
public Post()
|
public Post()
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class RssFetch : IHostedService, IDisposable
|
|||||||
feedPost.Title = post.Title;
|
feedPost.Title = post.Title;
|
||||||
feedPost.Url = post.Link;
|
feedPost.Url = post.Link;
|
||||||
feedPost.PostedAt = post.PublishingDate.GetValueOrDefault(DateTime.Now);
|
feedPost.PostedAt = post.PublishingDate.GetValueOrDefault(DateTime.Now);
|
||||||
feedPost.UrlHash = _hash.GenerateHash(feedPost.Url);
|
// feedPost.UrlHash = _hash.GenerateHash(feedPost.Url);
|
||||||
|
|
||||||
postsImages.Add(feedPost, await FetchImageUrl(post));
|
postsImages.Add(feedPost, await FetchImageUrl(post));
|
||||||
newPosts.Add(feedPost);
|
newPosts.Add(feedPost);
|
||||||
|
|||||||
Reference in New Issue
Block a user