WIP: Project setup with .NET backend and Next.js frontend
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace RacePlannerApi.Models;
|
||||
|
||||
public class Payment
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
public Guid RegistrationId { get; set; }
|
||||
|
||||
[ForeignKey("RegistrationId")]
|
||||
public Registration Registration { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
[Required]
|
||||
public PaymentMethod Method { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string? TransactionId { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? Notes { get; set; }
|
||||
|
||||
public DateTime PaymentDate { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public enum PaymentMethod
|
||||
{
|
||||
Cash,
|
||||
Online,
|
||||
Transfer
|
||||
}
|
||||
Reference in New Issue
Block a user