178 lines
4.4 KiB
C#
178 lines
4.4 KiB
C#
using Koogle.Domain.Enums;
|
|
|
|
namespace Koogle.Application.DTOs;
|
|
|
|
/// <summary>
|
|
/// Data transfer object representing an expense template.
|
|
/// </summary>
|
|
public record ExpenseDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the expense.
|
|
/// </summary>
|
|
public Guid Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// Name of the expense.
|
|
/// </summary>
|
|
public string Name { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Description of the expense.
|
|
/// </summary>
|
|
public string Description { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Default price of the expense.
|
|
/// </summary>
|
|
public decimal Price { get; init; }
|
|
|
|
/// <summary>
|
|
/// Indicates if this expense should be shown as a quick-action button.
|
|
/// </summary>
|
|
public bool IsOneClick { get; init; }
|
|
|
|
/// <summary>
|
|
/// Indicates if this is an inverse expense (charged to all except one person).
|
|
/// </summary>
|
|
public bool IsInverse { get; init; }
|
|
|
|
/// <summary>
|
|
/// Indicates if the price can vary when assigned.
|
|
/// </summary>
|
|
public bool IsVariable { get; init; }
|
|
|
|
/// <summary>
|
|
/// Type of the expense (Monetary or Material).
|
|
/// </summary>
|
|
public ExpenseType ExpenseType { get; init; }
|
|
|
|
/// <summary>
|
|
/// Unique identifier of the club this expense belongs to.
|
|
/// </summary>
|
|
public Guid ClubId { get; init; }
|
|
|
|
/// <summary>
|
|
/// Date and time when the expense was created.
|
|
/// </summary>
|
|
public DateTime CreatedAt { get; init; }
|
|
|
|
/// <summary>
|
|
/// Date and time when the expense was last modified.
|
|
/// </summary>
|
|
public DateTime? ModifiedAt { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data transfer object for creating a new expense template.
|
|
/// </summary>
|
|
public record CreateExpenseDto
|
|
{
|
|
/// <summary>
|
|
/// Name of the expense to create.
|
|
/// </summary>
|
|
public string Name { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Description of the expense.
|
|
/// </summary>
|
|
public string Description { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Default price of the expense.
|
|
/// </summary>
|
|
public decimal Price { get; init; }
|
|
|
|
/// <summary>
|
|
/// Indicates if this expense should be shown as a quick-action button.
|
|
/// </summary>
|
|
public bool IsOneClick { get; init; }
|
|
|
|
/// <summary>
|
|
/// Indicates if this is an inverse expense.
|
|
/// </summary>
|
|
public bool IsInverse { get; init; }
|
|
|
|
/// <summary>
|
|
/// Indicates if the price can vary when assigned.
|
|
/// </summary>
|
|
public bool IsVariable { get; init; }
|
|
|
|
/// <summary>
|
|
/// Type of the expense (Monetary or Material).
|
|
/// </summary>
|
|
public ExpenseType ExpenseType { get; init; } = ExpenseType.Monetary;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data transfer object for updating an existing expense template.
|
|
/// </summary>
|
|
public record UpdateExpenseDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the expense to update.
|
|
/// </summary>
|
|
public Guid Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// Updated name of the expense.
|
|
/// </summary>
|
|
public string Name { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Updated description of the expense.
|
|
/// </summary>
|
|
public string Description { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Updated default price.
|
|
/// </summary>
|
|
public decimal Price { get; init; }
|
|
|
|
/// <summary>
|
|
/// Updated one-click status.
|
|
/// </summary>
|
|
public bool IsOneClick { get; init; }
|
|
|
|
/// <summary>
|
|
/// Updated inverse expense status.
|
|
/// </summary>
|
|
public bool IsInverse { get; init; }
|
|
|
|
/// <summary>
|
|
/// Updated variable price status.
|
|
/// </summary>
|
|
public bool IsVariable { get; init; }
|
|
|
|
/// <summary>
|
|
/// Updated expense type.
|
|
/// </summary>
|
|
public ExpenseType ExpenseType { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Lightweight data transfer object for expense summaries.
|
|
/// </summary>
|
|
public record ExpenseSummaryDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the expense.
|
|
/// </summary>
|
|
public Guid Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// Name of the expense.
|
|
/// </summary>
|
|
public string Name { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Default price of the expense.
|
|
/// </summary>
|
|
public decimal Price { get; init; }
|
|
|
|
/// <summary>
|
|
/// Indicates if this expense is shown as a quick-action button.
|
|
/// </summary>
|
|
public bool IsOneClick { get; init; }
|
|
}
|