52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
|
|
using Books.Api.Domain.Accounts;
|
||
|
|
using EventFlow.Commands;
|
||
|
|
|
||
|
|
namespace Books.Api.Commands.Accounts;
|
||
|
|
|
||
|
|
public class CreateAccountCommand(
|
||
|
|
AccountId aggregateId,
|
||
|
|
string companyId,
|
||
|
|
string accountNumber,
|
||
|
|
string name,
|
||
|
|
AccountType accountType,
|
||
|
|
string? parentId,
|
||
|
|
string? description,
|
||
|
|
string? vatCodeId,
|
||
|
|
bool isSystemAccount = false,
|
||
|
|
string? standardAccountNumber = null)
|
||
|
|
: Command<AccountAggregate, AccountId>(aggregateId)
|
||
|
|
{
|
||
|
|
public string CompanyId { get; } = companyId;
|
||
|
|
public string AccountNumber { get; } = accountNumber;
|
||
|
|
public string Name { get; } = name;
|
||
|
|
public AccountType AccountType { get; } = accountType;
|
||
|
|
public string? ParentId { get; } = parentId;
|
||
|
|
public string? Description { get; } = description;
|
||
|
|
public string? VatCodeId { get; } = vatCodeId;
|
||
|
|
public bool IsSystemAccount { get; } = isSystemAccount;
|
||
|
|
/// <summary>
|
||
|
|
/// Erhvervsstyrelsens standardkontonummer for SAF-T rapportering.
|
||
|
|
/// </summary>
|
||
|
|
public string? StandardAccountNumber { get; } = standardAccountNumber;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class UpdateAccountCommand(
|
||
|
|
AccountId aggregateId,
|
||
|
|
string name,
|
||
|
|
string? parentId,
|
||
|
|
string? description,
|
||
|
|
string? vatCodeId)
|
||
|
|
: Command<AccountAggregate, AccountId>(aggregateId)
|
||
|
|
{
|
||
|
|
public string Name { get; } = name;
|
||
|
|
public string? ParentId { get; } = parentId;
|
||
|
|
public string? Description { get; } = description;
|
||
|
|
public string? VatCodeId { get; } = vatCodeId;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class DeactivateAccountCommand(AccountId aggregateId)
|
||
|
|
: Command<AccountAggregate, AccountId>(aggregateId);
|
||
|
|
|
||
|
|
public class ReactivateAccountCommand(AccountId aggregateId)
|
||
|
|
: Command<AccountAggregate, AccountId>(aggregateId);
|