Skip to content

Instantly share code, notes, and snippets.

@maor365scores
Created June 30, 2025 11:04
Show Gist options
  • Select an option

  • Save maor365scores/826832b299383f53b16c61cef7f9d34c to your computer and use it in GitHub Desktop.

Select an option

Save maor365scores/826832b299383f53b16c61cef7f9d34c to your computer and use it in GitHub Desktop.
using MongoDB.Bson.Serialization.Attributes;
namespace Sportifier.Users.Profiles.Search.Common;
public class Profile
{
[BsonElement("_id")]
public Guid UserId { get; set; }
[BsonElement("profileId")]
public Guid? ProfileId { get; set; }
[BsonElement("name")]
public ProfileName Name { get; set; }
[BsonElement("birthday")]
public DateTime Birthday { get; set; }
[BsonElement("nationality")]
public string Nationality { get; set; }
[BsonElement("country")]
public string Country { get; set; }
[BsonElement("email")]
[BsonIgnoreIfNull]
public string Email { get; set; }
[BsonElement("image")]
public string Image { get; set; }
[BsonElement("followersCount")]
public long FollowersCount { get; set; }
[BsonElement("followingsCount")]
public long FollowingsCount { get; set; }
[BsonElement("ranking")]
public long Ranking { get; set; }
[BsonElement("units")]
public IDictionary<string, decimal> Units { get; set; }
[BsonElement("unreadMessages")]
public long UnreadMessages { get; set; }
[BsonElement("createdAt")]
public DateTime CreatedAt { get; set; }
[BsonElement("updatedAt")]
public DateTime UpdatedAt { get; set; }
[BsonElement("groupId")] public Guid? GroupId { get; set; }
public class ProfileName
{
[BsonElement("user")]
public string User { get; set; }
[BsonElement("nick")]
public string Nick { get; set; }
[BsonElement("displayNameAsPrimary")]
public bool DisplayNameAsPrimary { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment