tentative campaign map management
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michele 2021-08-30 23:30:04 +01:00
parent c46e66595b
commit 4c345bd044
37 changed files with 1693 additions and 50 deletions

View file

@ -7,13 +7,22 @@ namespace Sledgemapper.Api.Commands
{
public double Timestamp { get; private set; }
public string SessionName { get; private set; }
public int UserId { get; private set; }
public string Campaign { get; private set; }
public string UserId { get; private set; }
public BaseCommand(string sessionName, int userId)
public BaseCommand(string sessionName, string userId)
{
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
SessionName = sessionName;
UserId = userId;
}
public BaseCommand(string campaign, string sessionName, string userId)
{
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
SessionName = sessionName;
Campaign = campaign;
UserId = userId;
}
}
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Note Note { get; private set; }
public DeleteNoteCommand(string sessionName, Note note, int userId) : base(sessionName, userId)
public DeleteNoteCommand(string sessionName, Note note, string userId) : base(sessionName, userId)
{
Note = note;
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Overlay Overlay { get; private set; }
public DeleteOverlayCommand(string sessionName, Overlay overlay, int userId) : base(sessionName, userId)
public DeleteOverlayCommand(string sessionName, Overlay overlay, string userId) : base(sessionName, userId)
{
Overlay = overlay;
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Tile Tile { get; private set; }
public DeleteTileCommand(string sessionName, Tile tile, int userId) : base(sessionName, userId)
public DeleteTileCommand(string sessionName, Tile tile, string userId) : base(sessionName, userId)
{
Tile = tile;
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Wall Wall { get; private set; }
public DeleteWallCommand(string sessionName, Wall wall, int userId) : base(sessionName, userId)
public DeleteWallCommand(string sessionName, Wall wall, string userId) : base(sessionName, userId)
{
Wall = wall;
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Line Line { get; private set; }
public NewLineCommand(string sessionName, Line line, int userId) : base(sessionName, userId)
public NewLineCommand(string sessionName, Line line, string userId) : base(sessionName, userId)
{
Line = line;
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Note Note { get; private set; }
public NewNoteCommand(string sessionName, Note note, int userId) : base(sessionName, userId)
public NewNoteCommand(string sessionName, Note note, string userId) : base(sessionName, userId)
{
Note = note;
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Overlay Overlay { get; private set; }
public NewOverlayCommand(string sessionName, Overlay overlay, int userId) : base(sessionName, userId)
public NewOverlayCommand(string sessionName, Overlay overlay, string userId) : base(sessionName, userId)
{
Overlay = overlay;
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Room Room { get; private set; }
public NewRoomCommand(string sessionName, Room room, int userId) : base(sessionName, userId)
public NewRoomCommand(string sessionName, Room room, string userId) : base(sessionName, userId)
{
Room = room;
}

View file

@ -5,7 +5,7 @@ namespace Sledgemapper.Api.Commands
{
public class NewSessionCommand : BaseCommand<bool>
{
public NewSessionCommand(string sessionName, int userId) : base(sessionName, userId)
public NewSessionCommand(string campaign, string sessionName, string userId) : base(campaign, sessionName, userId)
{
}
}

View file

@ -5,7 +5,7 @@ namespace Sledgemapper.Api.Commands
public class NewSnapshotCommand : BaseCommand<bool>
{
public Session Session { get; private set; }
public NewSnapshotCommand(string sessionName, Session session, int userId) : base(sessionName, userId)
public NewSnapshotCommand(string sessionName, Session session, string userId) : base(sessionName, userId)
{
Session = session;
}

View file

@ -5,7 +5,7 @@ namespace Sledgemapper.Api.Commands
public class NewTileCommand : BaseCommand<bool>
{
public Tile Tile { get; private set; }
public NewTileCommand(string sessionName, Tile tile, int userId) : base(sessionName, userId)
public NewTileCommand(string sessionName, Tile tile, string userId) : base(sessionName, userId)
{
Tile = tile;
}

View file

@ -6,7 +6,7 @@ namespace Sledgemapper.Api.Commands
{
public Wall Wall { get; private set; }
public NewWallCommand(string sessionName, Wall wall, int userId) : base(sessionName, userId)
public NewWallCommand(string sessionName, Wall wall, string userId) : base(sessionName, userId)
{
Wall = wall;
}