vassago/Models/Message.cs
adam 6764acc55f
All checks were successful
gitea.arg.rip/vassago/pipeline/head This commit looks good
kafka messages include UAC match
2025-05-22 11:46:03 -04:00

33 lines
1.0 KiB
C#

namespace vassago.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Reflection;
using System.Threading.Tasks;
using Discord.WebSocket;
using Microsoft.EntityFrameworkCore;
public class Message
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
public string Protocol { get; set; }
public string ExternalId { get; set; }
public string Content { get; set; }
public bool MentionsMe { get; set; }
public DateTimeOffset Timestamp { get; set; }
public bool ActedOn { get; set; }
[DeleteBehavior(DeleteBehavior.Cascade)]
public List<Attachment> Attachments { get; set; }
public Account Author { get; set; }
public Channel Channel { get; set; }
//TODO: these are nicities to make it OOP, but it couples them with their respective platform interfaces (and connections!)
[NonSerialized]
public Func<string, Task> Reply;
[NonSerialized]
public Func<string, Task> React;
}