initial upload
This commit is contained in:
parent
a0aa9cc28e
commit
f857f43df4
553 changed files with 46169 additions and 13 deletions
30
src/Web/Insight.Web/Models/ChatUser.cs
Normal file
30
src/Web/Insight.Web/Models/ChatUser.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using MongoDB.Bson;
|
||||
|
||||
namespace Insight.Web.Models;
|
||||
|
||||
public class ChatUser
|
||||
{
|
||||
public ObjectId Uid { get; set; }
|
||||
public bool Online { get; set; }
|
||||
public string? Username { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public byte[]? Avatar { get; set; }
|
||||
|
||||
public ChatUser(ObjectId uid)
|
||||
{
|
||||
Uid = uid;
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj == null || GetType() != obj.GetType()) return false;
|
||||
if (obj is ChatUser user && Uid != user.Uid) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Uid.GetHashCode();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue