Skip to content

Commit 5689963

Browse files
committed
tested with postman
1 parent ae073dd commit 5689963

1 file changed

Lines changed: 16 additions & 29 deletions

File tree

MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageRequest.cs

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,31 @@
55

66
namespace MangoAPI.BusinessLogic.ApiCommands.Messages;
77

8-
public record SendMessageRequest
8+
public class SendMessageRequest
99
{
10-
[JsonConstructor]
11-
public SendMessageRequest(
12-
string messageText,
13-
Guid chatId,
14-
string inReplayToAuthor,
15-
string inReplayToText,
16-
DateTime? createdAt,
17-
Guid? messageId,
18-
IFormFile attachment)
19-
{
20-
MessageText = messageText;
21-
ChatId = chatId;
22-
InReplayToAuthor = inReplayToAuthor;
23-
InReplayToText = inReplayToText;
24-
CreatedAt = createdAt;
25-
MessageId = messageId;
26-
Attachment = attachment;
27-
}
28-
2910
[DefaultValue("hello world")]
30-
public string MessageText { get; }
11+
[JsonPropertyName("messageText")]
12+
public string MessageText { get; set; }
3113

3214
[DefaultValue("a8747c37-c5ef-4a87-943c-3ee3ae0a2871")]
33-
public Guid ChatId { get; }
15+
[JsonPropertyName("chatId")]
16+
public Guid ChatId { get; set; }
3417

3518
[DefaultValue("John Doe")]
36-
public string InReplayToAuthor { get; }
19+
[JsonPropertyName("inReplayToAuthor")]
20+
public string InReplayToAuthor { get; set; }
3721

3822
[DefaultValue("Hello world!")]
39-
public string InReplayToText { get; }
23+
[JsonPropertyName("inReplayToText")]
24+
public string InReplayToText { get; set; }
4025

4126
[DefaultValue("2021-08-01T00:00:00.0000000")]
42-
public DateTime? CreatedAt { get; }
27+
[JsonPropertyName("createdAt")]
28+
public DateTime? CreatedAt { get; set; }
4329

4430
[DefaultValue("f56ac722-a57b-411c-8306-c2e05fb1a8df")]
45-
public Guid? MessageId { get; }
46-
47-
public IFormFile Attachment { get; }
48-
}
31+
[JsonPropertyName("messageId")]
32+
public Guid? MessageId { get; set; }
33+
34+
public IFormFile Attachment { get; set; }
35+
}

0 commit comments

Comments
 (0)