-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b30889c
commit e4c102b
Showing
12 changed files
with
364 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// <copyright file="DeletedMessageView.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
namespace FishyFlip.Models; | ||
|
||
/// <summary> | ||
/// Represents a view of a message in a chat conversation. | ||
/// </summary> | ||
public class DeletedMessageView : ATRecord | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DeletedMessageView"/> class. | ||
/// </summary> | ||
/// <param name="id">The unique identifier of the message.</param> | ||
/// <param name="rev">The revision of the message.</param> | ||
/// <param name="sender">The sender of the message.</param> | ||
/// <param name="sentAt">The date and time when the message was sent.</param> | ||
/// <param name="type">The type of the message. If not provided, defaults to <see cref="Constants.ConversationTypes.DeletedMessageView"/>.</param> | ||
[JsonConstructor] | ||
public DeletedMessageView(string id, string rev, ChatSender sender, DateTime sentAt, string? type = default) | ||
: base(type) | ||
{ | ||
this.Id = id; | ||
this.Rev = rev; | ||
this.Sender = sender; | ||
this.SentAt = sentAt; | ||
this.Type = type ?? Constants.ConversationTypes.DeletedMessageView; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the unique identifier of the message. | ||
/// </summary> | ||
public string Id { get; } | ||
|
||
/// <summary> | ||
/// Gets the revision of the message. | ||
/// </summary> | ||
public string Rev { get; } | ||
|
||
/// <summary> | ||
/// Gets the sender of the message. | ||
/// </summary> | ||
public ChatSender Sender { get; } | ||
|
||
/// <summary> | ||
/// Gets the date and time when the message was sent. | ||
/// </summary> | ||
public DateTime SentAt { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// <copyright file="UpdateRead.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
namespace FishyFlip.Models.Internal; | ||
|
||
/// <summary> | ||
/// Update Conversation Read. | ||
/// </summary> | ||
/// <param name="ConvoId">Conversation Id.</param> | ||
public record UpdateRead(string ConvoId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// <copyright file="LeaveConvoResponse.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
namespace FishyFlip.Models; | ||
|
||
/// <summary> | ||
/// Response to leaving a conversation. | ||
/// </summary> | ||
/// <param name="ConvoId">Conversation id.</param> | ||
/// <param name="Rev">Rev Id.</param> | ||
public record LeaveConvoResponse(string ConvoId, string Rev); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// <copyright file="LogBeginConvo.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
namespace FishyFlip.Models; | ||
|
||
/// <summary> | ||
/// Represents a log begin conversation message. | ||
/// </summary> | ||
public class LogBeginConvo : ATRecord | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="LogBeginConvo"/> class. | ||
/// </summary> | ||
/// <param name="convoId">The conversation ID.</param> | ||
/// <param name="rev">The revision.</param> | ||
/// <param name="type">The type of the record. Optional.</param> | ||
public LogBeginConvo(string convoId, string rev, string? type = default) | ||
: base(type) | ||
{ | ||
this.ConvoId = convoId; | ||
this.Rev = rev; | ||
this.Type = type ?? Constants.ConversationTypes.LogBeginConvo; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the conversation ID. | ||
/// </summary> | ||
public string ConvoId { get; } | ||
|
||
/// <summary> | ||
/// Gets the revision. | ||
/// </summary> | ||
public string Rev { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// <copyright file="LogCreateMessage.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
namespace FishyFlip.Models; | ||
|
||
/// <summary> | ||
/// Represents a log creation message. | ||
/// </summary> | ||
public class LogCreateMessage : ATRecord | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="LogCreateMessage"/> class. | ||
/// </summary> | ||
/// <param name="convoId">The conversation ID.</param> | ||
/// <param name="message">The message view.</param> | ||
/// <param name="rev">The revision.</param> | ||
/// <param name="type">The type of the record. Optional.</param> | ||
public LogCreateMessage(string convoId, MessageView message, string rev, string? type = default) | ||
: base(type) | ||
{ | ||
this.ConvoId = convoId; | ||
this.Message = message; | ||
this.Rev = rev; | ||
this.Type = type ?? Constants.ConversationTypes.LogCreateMessage; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the conversation ID. | ||
/// </summary> | ||
public string ConvoId { get; } | ||
|
||
/// <summary> | ||
/// Gets the message view. | ||
/// </summary> | ||
public MessageView Message { get; } | ||
|
||
/// <summary> | ||
/// Gets the revision. | ||
/// </summary> | ||
public string Rev { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// <copyright file="LogDeleteMessage.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
namespace FishyFlip.Models; | ||
|
||
/// <summary> | ||
/// Represents a log delete message. | ||
/// </summary> | ||
public class LogDeleteMessage : ATRecord | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="LogDeleteMessage"/> class. | ||
/// </summary> | ||
/// <param name="convoId">The conversation ID.</param> | ||
/// <param name="message">The message view.</param> | ||
/// <param name="rev">The revision.</param> | ||
/// <param name="type">The type of the record. Optional.</param> | ||
public LogDeleteMessage(string convoId, DeletedMessageView message, string rev, string? type = default) | ||
: base(type) | ||
{ | ||
this.ConvoId = convoId; | ||
this.Message = message; | ||
this.Rev = rev; | ||
this.Type = type ?? Constants.ConversationTypes.LogDeleteMessage; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the conversation ID. | ||
/// </summary> | ||
public string ConvoId { get; } | ||
|
||
/// <summary> | ||
/// Gets the message view. | ||
/// </summary> | ||
public DeletedMessageView Message { get; } | ||
|
||
/// <summary> | ||
/// Gets the revision. | ||
/// </summary> | ||
public string Rev { get; } | ||
} |
Oops, something went wrong.