vassago/Models/User.cs

28 lines
911 B
C#
Raw Normal View History

2023-06-01 00:03:23 -04:00
namespace vassago.Models;
using System;
2023-06-01 00:03:23 -04:00
using System.Collections.Generic;
2023-06-05 14:55:48 -04:00
using System.ComponentModel.DataAnnotations.Schema;
using System.Reflection;
2023-06-01 00:03:23 -04:00
public class User //more like "user's account - no concept of the person outside of the protocol. (yet?)
{
2023-06-05 14:55:48 -04:00
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
2023-06-01 00:03:23 -04:00
public Guid Id { get; set; }
public ulong? ExternalId { get; set; }
2023-06-05 14:55:48 -04:00
public string Username { get; set; } //TODO: display names. many protocols support this feature.
2023-06-01 00:03:23 -04:00
public bool IsBot { get; set; } //webhook counts
2023-06-05 14:55:48 -04:00
public Channel SeenInChannel { get; set; }
public string Protocol { get; set; }
public User(){}
public User(User u)
{
Type t = typeof(User);
PropertyInfo[] properties = t.GetProperties();
foreach (PropertyInfo pi in properties)
{
pi.SetValue(this, pi.GetValue(u, null), null);
}
}
}