Expanded on existing whiteboard

This commit is contained in:
Veljko Tosic
2026-02-09 22:24:33 +01:00
parent 73b222b763
commit db122da753
12 changed files with 237 additions and 20 deletions

View File

@@ -1,7 +1,16 @@
using System.Windows.Input;
using AipsCore.Application.Abstract.Command;
using AipsCore.Domain.Models.Whiteboard.Enums;
using AipsCore.Domain.Models.Whiteboard.ValueObjects;
namespace AipsCore.Application.Models.Whiteboard.Command.CreateWhiteboard;
public record CreateWhiteboardCommand(string OwnerId, string Title) : ICommand<WhiteboardId>;
public record CreateWhiteboardCommand(
string OwnerId,
string Title,
DateTime CreatedAt,
DateTime DeletedAt,
int MaxParticipants,
WhiteboardJoinPolicy JoinPolicy,
WhiteboardState State)
: ICommand<WhiteboardId>;

View File

@@ -20,7 +20,15 @@ public class CreateWhiteboardCommandHandler : ICommandHandler<CreateWhiteboardCo
{
var whiteboardCode = await WhiteboardCode.GenerateUniqueAsync(_whiteboardRepository);
var whiteboard = Domain.Models.Whiteboard.Whiteboard.Create(command.OwnerId, whiteboardCode.CodeValue, command.Title);
var whiteboard = Domain.Models.Whiteboard.Whiteboard.Create(
command.OwnerId,
whiteboardCode.CodeValue,
command.Title,
command.CreatedAt,
command.DeletedAt,
command.MaxParticipants,
command.JoinPolicy,
command.State);
await _whiteboardRepository.Save(whiteboard, cancellationToken);
await _unitOfWork.SaveChangesAsync(cancellationToken);