mirror of
https://github.com/CannedNet/CannedNet.git
synced 2026-10-25 15:09:23 -07:00
move models to shared, make new admin project
This commit is contained in:
@@ -0,0 +1,232 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace CannedNet;
|
||||
|
||||
public class NotificationMessage
|
||||
{
|
||||
[JsonPropertyName("notificationId")]
|
||||
public string? NotificationId { get; set; }
|
||||
|
||||
[JsonPropertyName("notificationType")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public PushNotificationId? NotificationType { get; set; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("fromAccountId")]
|
||||
public int? FromAccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("toAccountId")]
|
||||
public int? ToAccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("createdAt")]
|
||||
public DateTime? CreatedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("data")]
|
||||
public Dictionary<string, object>? Data { get; set; }
|
||||
}
|
||||
|
||||
public class SubscriptionUpdateProfile
|
||||
{
|
||||
[JsonPropertyName("accountId")]
|
||||
public int? AccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("profileImage")]
|
||||
public string? ProfileImage { get; set; }
|
||||
|
||||
[JsonPropertyName("displayName")]
|
||||
public string? DisplayName { get; set; }
|
||||
|
||||
[JsonPropertyName("username")]
|
||||
public string? Username { get; set; }
|
||||
}
|
||||
|
||||
public class SubscriptionUpdatePresence
|
||||
{
|
||||
[JsonPropertyName("accountId")]
|
||||
public int? AccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("presence")]
|
||||
public string? Presence { get; set; }
|
||||
|
||||
[JsonPropertyName("currentRoomId")]
|
||||
public string? CurrentRoomId { get; set; }
|
||||
|
||||
[JsonPropertyName("currentWorldId")]
|
||||
public string? CurrentWorldId { get; set; }
|
||||
|
||||
[JsonPropertyName("lastSeen")]
|
||||
public DateTime? LastSeen { get; set; }
|
||||
}
|
||||
|
||||
public class SubscriptionUpdateGameSession
|
||||
{
|
||||
[JsonPropertyName("gameSessionId")]
|
||||
public string? GameSessionId { get; set; }
|
||||
|
||||
[JsonPropertyName("roomId")]
|
||||
public string? RoomId { get; set; }
|
||||
|
||||
[JsonPropertyName("worldId")]
|
||||
public string? WorldId { get; set; }
|
||||
|
||||
[JsonPropertyName("players")]
|
||||
public List<int>? Players { get; set; }
|
||||
}
|
||||
|
||||
public class SubscriptionUpdateRoom
|
||||
{
|
||||
[JsonPropertyName("roomId")]
|
||||
public string? RoomId { get; set; }
|
||||
|
||||
[JsonPropertyName("worldId")]
|
||||
public string? WorldId { get; set; }
|
||||
|
||||
[JsonPropertyName("roomName")]
|
||||
public string? RoomName { get; set; }
|
||||
|
||||
[JsonPropertyName("version")]
|
||||
public string? Version { get; set; }
|
||||
}
|
||||
|
||||
public class RelationshipChangedNotification
|
||||
{
|
||||
[JsonPropertyName("accountId")]
|
||||
public int? AccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("relationshipType")]
|
||||
public RelationshipType? RelationshipType { get; set; }
|
||||
|
||||
[JsonPropertyName("status")]
|
||||
public string? Status { get; set; }
|
||||
}
|
||||
|
||||
public class PresenceHeartbeatResponse
|
||||
{
|
||||
[JsonPropertyName("currentRoomId")]
|
||||
public string? CurrentRoomId { get; set; }
|
||||
|
||||
[JsonPropertyName("currentWorldId")]
|
||||
public string? CurrentWorldId { get; set; }
|
||||
|
||||
[JsonPropertyName("presence")]
|
||||
public string? Presence { get; set; }
|
||||
}
|
||||
|
||||
public class ModerationNotification
|
||||
{
|
||||
[JsonPropertyName("reason")]
|
||||
public string? Reason { get; set; }
|
||||
|
||||
[JsonPropertyName("duration")]
|
||||
public int? Duration { get; set; }
|
||||
|
||||
[JsonPropertyName("moderatedBy")]
|
||||
public string? ModeratedBy { get; set; }
|
||||
|
||||
[JsonPropertyName("message")]
|
||||
public string? Message { get; set; }
|
||||
|
||||
[JsonPropertyName("gameSessionId")]
|
||||
public string? GameSessionId { get; set; }
|
||||
}
|
||||
|
||||
public class GiftPackageNotification
|
||||
{
|
||||
[JsonPropertyName("giftPackageId")]
|
||||
public string? GiftPackageId { get; set; }
|
||||
|
||||
[JsonPropertyName("fromAccountId")]
|
||||
public int? FromAccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("giftType")]
|
||||
public string? GiftType { get; set; }
|
||||
}
|
||||
|
||||
public class StorefrontBalanceNotification
|
||||
{
|
||||
[JsonPropertyName("balance")]
|
||||
public decimal? Balance { get; set; }
|
||||
|
||||
[JsonPropertyName("currency")]
|
||||
public string? Currency { get; set; }
|
||||
|
||||
[JsonPropertyName("purchaseId")]
|
||||
public string? PurchaseId { get; set; }
|
||||
}
|
||||
|
||||
public class ConsumableMappingNotification
|
||||
{
|
||||
[JsonPropertyName("mappingId")]
|
||||
public string? MappingId { get; set; }
|
||||
|
||||
[JsonPropertyName("consumableId")]
|
||||
public string? ConsumableId { get; set; }
|
||||
|
||||
[JsonPropertyName("quantity")]
|
||||
public int? Quantity { get; set; }
|
||||
}
|
||||
|
||||
public class PlayerEventNotification
|
||||
{
|
||||
[JsonPropertyName("eventId")]
|
||||
public string? EventId { get; set; }
|
||||
|
||||
[JsonPropertyName("eventName")]
|
||||
public string? EventName { get; set; }
|
||||
|
||||
[JsonPropertyName("eventType")]
|
||||
public string? EventType { get; set; }
|
||||
|
||||
[JsonPropertyName("worldId")]
|
||||
public string? WorldId { get; set; }
|
||||
|
||||
[JsonPropertyName("responseStatus")]
|
||||
public string? ResponseStatus { get; set; }
|
||||
|
||||
[JsonPropertyName("state")]
|
||||
public string? State { get; set; }
|
||||
}
|
||||
|
||||
public class ChatMessageNotification
|
||||
{
|
||||
[JsonPropertyName("channelId")]
|
||||
public string? ChannelId { get; set; }
|
||||
|
||||
[JsonPropertyName("fromAccountId")]
|
||||
public int? FromAccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("messageId")]
|
||||
public string? MessageId { get; set; }
|
||||
|
||||
[JsonPropertyName("message")]
|
||||
public string? Message { get; set; }
|
||||
|
||||
[JsonPropertyName("channelType")]
|
||||
public string? ChannelType { get; set; }
|
||||
}
|
||||
|
||||
public class CommunityBoardNotification
|
||||
{
|
||||
[JsonPropertyName("boardId")]
|
||||
public string? BoardId { get; set; }
|
||||
|
||||
[JsonPropertyName("announcementId")]
|
||||
public string? AnnouncementId { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonPropertyName("content")]
|
||||
public string? Content { get; set; }
|
||||
}
|
||||
|
||||
public class InventionModerationNotification
|
||||
{
|
||||
[JsonPropertyName("inventionId")]
|
||||
public string? InventionId { get; set; }
|
||||
|
||||
[JsonPropertyName("moderationState")]
|
||||
public ModerationState? ModerationState { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
namespace CannedNet;
|
||||
|
||||
public enum PushNotificationId
|
||||
{
|
||||
RelationshipChanged = 1,
|
||||
MessageReceived = 2,
|
||||
MessageDeleted = 3,
|
||||
PresenceHeartbeatResponse = 4,
|
||||
RefreshLogin = 5,
|
||||
Logout = 6,
|
||||
SubscriptionUpdateProfile = 11,
|
||||
SubscriptionUpdatePresence = 12,
|
||||
SubscriptionUpdateGameSession = 13,
|
||||
SubscriptionUpdateRoom = 15,
|
||||
ModerationQuitGame = 20,
|
||||
ModerationUpdateRequired = 21,
|
||||
ModerationKick = 22,
|
||||
ModerationKickAttemptFailed = 23,
|
||||
ModerationRoomBan = 24,
|
||||
ServerMaintenance = 25,
|
||||
GiftPackageReceived = 30,
|
||||
GiftPackageReceivedImmediate = 31,
|
||||
ProfileJuniorStatusUpdate = 40,
|
||||
RelationshipsInvalid = 50,
|
||||
StorefrontBalanceAdd = 60,
|
||||
StorefrontBalanceUpdate = 61,
|
||||
StorefrontBalancePurchase = 62,
|
||||
ConsumableMappingAdded = 70,
|
||||
ConsumableMappingRemoved = 71,
|
||||
PlayerEventCreated = 80,
|
||||
PlayerEventUpdated = 81,
|
||||
PlayerEventDeleted = 82,
|
||||
PlayerEventResponseChanged = 83,
|
||||
PlayerEventResponseDeleted = 84,
|
||||
PlayerEventStateChanged = 85,
|
||||
ChatMessageReceived = 90,
|
||||
CommunityBoardUpdate = 95,
|
||||
CommunityBoardAnnouncementUpdate = 96,
|
||||
InventionModerationStateChanged = 100
|
||||
}
|
||||
Reference in New Issue
Block a user