This commit includes all previously untracked backend files: Domain: - Accounts, Attachments, BankConnections, Customers - FiscalYears, Invoices, JournalEntryDrafts - Orders, Products, UserAccess Commands & Handlers: - Full CQRS command structure for all domains Repositories: - PostgreSQL repositories for all read models - Bank transaction and ledger repositories GraphQL: - Input types, scalars, and types for all entities - Mutations and queries Infrastructure: - Banking integration (Enable Banking client) - File storage, Invoicing, Reporting, SAF-T export - Database migrations (003-029) Tests: - Integration tests for GraphQL endpoints - Domain tests - Invoicing and reporting tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using Books.Api.Domain.UserAccess;
|
|
using EventFlow.Commands;
|
|
|
|
namespace Books.Api.Commands.UserAccess;
|
|
|
|
public class GrantUserCompanyAccessCommand(
|
|
UserCompanyAccessId aggregateId,
|
|
string userId,
|
|
string companyId,
|
|
CompanyRole role,
|
|
string grantedBy) : Command<UserCompanyAccessAggregate, UserCompanyAccessId>(aggregateId)
|
|
{
|
|
public string UserId { get; } = userId;
|
|
public string CompanyId { get; } = companyId;
|
|
public CompanyRole Role { get; } = role;
|
|
public string GrantedBy { get; } = grantedBy;
|
|
}
|
|
|
|
public class ChangeUserCompanyAccessRoleCommand(
|
|
UserCompanyAccessId aggregateId,
|
|
CompanyRole newRole,
|
|
string changedBy) : Command<UserCompanyAccessAggregate, UserCompanyAccessId>(aggregateId)
|
|
{
|
|
public CompanyRole NewRole { get; } = newRole;
|
|
public string ChangedBy { get; } = changedBy;
|
|
}
|
|
|
|
public class RevokeUserCompanyAccessCommand(
|
|
UserCompanyAccessId aggregateId,
|
|
string revokedBy) : Command<UserCompanyAccessAggregate, UserCompanyAccessId>(aggregateId)
|
|
{
|
|
public string RevokedBy { get; } = revokedBy;
|
|
}
|