Add webhook support for card transactions and notifications.
Some optimizations and fixes Signed-off-by: Dmitrii <computer@yawaflua.tech> Took 2 hours 4 minutes
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using SpMega.Backend.Persistent.Models.Users;
|
||||
|
||||
namespace SpMega.Backend.Persistent.Models.Transactions;
|
||||
|
||||
public class Notification
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ReceiverId { get; set; }
|
||||
public string ReceiverName { get; set; }
|
||||
public string ReceiverNumber { get; set; }
|
||||
public string SenderName { get; set; }
|
||||
public string SenderNumber { get; set; }
|
||||
|
||||
public string Comment { get; set; }
|
||||
public int Amount { get; set; }
|
||||
public string Type { get; set; }
|
||||
|
||||
public bool IsRead { get; set; } = false;
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
using SpMega.Backend.Persistent.Models.Users;
|
||||
|
||||
@@ -7,13 +8,15 @@ public class Transaction
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string ShortId { get; set; } = Program.GenerateRandomString(8);
|
||||
public string ReceiverName { get; set; }
|
||||
public string ReceiverCardNumber { get; set; }
|
||||
[MaxLength(2048)] public string ReceiverName { get; set; }
|
||||
[MaxLength(2048)] public string ReceiverCardNumber { get; set; }
|
||||
[JsonIgnore] public User Sender { get; set; }
|
||||
public string SenderCardNumber { get; set; }
|
||||
|
||||
[MaxLength(2048)] public string SenderMinecraftName { get; set; }
|
||||
[MaxLength(2048)] public string SenderCardNumber { get; set; }
|
||||
|
||||
public int Amount { get; set; } = 0;
|
||||
public string Comment { get; set; } = "";
|
||||
[MaxLength(2048)] public string Comment { get; set; } = "";
|
||||
|
||||
public DateTime TransactionDate { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
Reference in New Issue
Block a user