缴费系统

This commit is contained in:
biss committed 2026-08-22 18:52:41 +08:00
1 parent 6e2eaad0fa
commit b1075acf8f
17 files changed
+1161

No files matched your search

@@ -0,0 +1,85 @@
using Jiaowu.Api.Domain.Common;
using Jiaowu.Api.Domain.Identity;
namespace Jiaowu.Api.Domain.Academic;
public sealed class CampusRegistrationProject : EntityBase
{
public required string Code { get; set; }
public required string Name { get; set; }
public string? Description { get; set; }
public Guid? CollegeId { get; set; }
public College? College { get; set; }
public DateTime RegistrationStartsAt { get; set; }
public DateTime RegistrationEndsAt { get; set; }
public int Capacity { get; set; }
public decimal FeeAmount { get; set; }
public bool RequiresReview { get; set; }
public CampusRegistrationProjectStatus Status { get; set; } = CampusRegistrationProjectStatus.Draft;
public string? ContactName { get; set; }
public string? ContactPhone { get; set; }
public string? Notes { get; set; }
public Guid CreatedByUserId { get; set; }
public ApplicationUser? CreatedByUser { get; set; }
public ICollection<CampusRegistrationApplication> Applications { get; set; } = [];
}
public sealed class CampusRegistrationApplication : EntityBase
{
public Guid ProjectId { get; set; }
public CampusRegistrationProject? Project { get; set; }
public Guid StudentId { get; set; }
public Student? Student { get; set; }
public CampusRegistrationApplicationStatus Status { get; set; }
public string? ApplicantNote { get; set; }
public Guid? ReviewedByUserId { get; set; }
public ApplicationUser? ReviewedByUser { get; set; }
public DateTime? ReviewedAt { get; set; }
public string? ReviewComment { get; set; }
public DateTime? ConfirmedAt { get; set; }
public DateTime? CancelledAt { get; set; }
public CampusPaymentOrder? PaymentOrder { get; set; }
}
public sealed class CampusPaymentOrder : EntityBase
{
public Guid ApplicationId { get; set; }
public CampusRegistrationApplication? Application { get; set; }
public required string OrderNumber { get; set; }
public decimal Amount { get; set; }
public CampusPaymentMethod PaymentMethod { get; set; }
public CampusPaymentOrderStatus Status { get; set; } = CampusPaymentOrderStatus.Pending;
public Guid? ConfirmedByUserId { get; set; }
public ApplicationUser? ConfirmedByUser { get; set; }
public DateTime? ConfirmedAt { get; set; }
public string? ReferenceNumber { get; set; }
public string? Note { get; set; }
}
public sealed class CampusWalletAccount : EntityBase
{
public Guid StudentId { get; set; }
public Student? Student { get; set; }
public decimal Balance { get; set; }
public ICollection<CampusWalletTransaction> Transactions { get; set; } = [];
}
public sealed class CampusWalletTransaction : EntityBase
{
public Guid WalletAccountId { get; set; }
public CampusWalletAccount? WalletAccount { get; set; }
public decimal Amount { get; set; }
public decimal BalanceAfter { get; set; }
public CampusWalletTransactionType Type { get; set; }
public required string Reason { get; set; }
public Guid? PaymentOrderId { get; set; }
public CampusPaymentOrder? PaymentOrder { get; set; }
public Guid? OperatedByUserId { get; set; }
public ApplicationUser? OperatedByUser { get; set; }
}
public enum CampusRegistrationProjectStatus { Draft = 1, Published = 2, Closed = 3 }
public enum CampusRegistrationApplicationStatus { PendingReview = 1, PendingPayment = 2, Confirmed = 3, Waitlisted = 4, Rejected = 5, Cancelled = 6 }
public enum CampusPaymentMethod { Free = 1, Offline = 2, Balance = 3 }
public enum CampusPaymentOrderStatus { Pending = 1, Paid = 2, Cancelled = 3 }
public enum CampusWalletTransactionType { AdministratorAdjustment = 1, Payment = 2 }
@@ -0,0 +1,47 @@
using Jiaowu.Api.Domain.Common;
namespace Jiaowu.Api.Domain.Academic;
public sealed class TuitionTermSetting : EntityBase
{
public Guid AcademicTermId { get; set; }
public AcademicTerm? AcademicTerm { get; set; }
public decimal CreditUnitPrice { get; set; }
public TuitionTermStatus Status { get; set; } = TuitionTermStatus.Draft;
public DateTime? CreditsLockedAt { get; set; }
public Guid? CreditsLockedByUserId { get; set; }
}
public sealed class TuitionBill : EntityBase
{
public Guid AcademicTermId { get; set; }
public AcademicTerm? AcademicTerm { get; set; }
public Guid StudentId { get; set; }
public Student? Student { get; set; }
public decimal BaseTuition { get; set; }
public decimal AccommodationFee { get; set; }
public decimal CreditCount { get; set; }
public decimal CreditFee { get; set; }
public decimal ReconciliationAdjustment { get; set; }
public decimal BasePaid { get; set; }
public decimal AccommodationPaid { get; set; }
public decimal CreditPaid { get; set; }
public decimal AdjustmentPaid { get; set; }
public ICollection<TuitionPayment> Payments { get; set; } = [];
}
public sealed class TuitionPayment : EntityBase
{
public Guid TuitionBillId { get; set; }
public TuitionBill? TuitionBill { get; set; }
public TuitionFeeItem Item { get; set; }
public decimal Amount { get; set; }
public TuitionPaymentMethod Method { get; set; }
public string? ReferenceNumber { get; set; }
public Guid ConfirmedByUserId { get; set; }
public DateTime ConfirmedAt { get; set; }
}
public enum TuitionTermStatus { Draft = 1, CreditsLocked = 2, OpenForPayment = 3, Reconciliation = 4, Closed = 5 }
public enum TuitionFeeItem { BaseTuition = 1, CreditFee = 2, AccommodationFee = 3, ReconciliationAdjustment = 4 }
public enum TuitionPaymentMethod { Offline = 1, Balance = 2 }