Add timestamp to WebAnnouncements

This commit is contained in:
Slendy 2023-08-13 22:29:22 -05:00
commit c6f79da052
No known key found for this signature in database
GPG key ID: 7288D68361B91428
2 changed files with 7 additions and 2 deletions

View file

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
@ -13,6 +14,8 @@ public class WebsiteAnnouncementEntity
public string Content { get; set; }
public DateTime PublishedAt { get; set; }
#nullable enable
public int? PublisherId { get; set; }

View file

@ -1,5 +1,6 @@
using System.ComponentModel;
using System.Xml.Serialization;
using LBPUnion.ProjectLighthouse.Extensions;
using LBPUnion.ProjectLighthouse.Types.Entities.Website;
namespace LBPUnion.ProjectLighthouse.Types.Serialization.News;
@ -37,9 +38,10 @@ public class GameNewsObject : ILbpSerializable
{
Id = entity.AnnouncementId,
Title = entity.Title,
Summary = "there's an extra spot for summary here",
Summary = "",
Text = entity.Content,
Category = "no_category",
Timestamp = entity.PublishedAt.ToUnixTimeMilliseconds(),
};
}