Added author to shape model
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using AipsCore.Domain.Common.ValueObjects;
|
||||
using AipsCore.Domain.Models.Shape.Enums;
|
||||
using AipsCore.Domain.Models.Shape.ValueObjects;
|
||||
using AipsCore.Domain.Models.User.ValueObjects;
|
||||
using AipsCore.Domain.Models.Whiteboard.ValueObjects;
|
||||
|
||||
namespace AipsCore.Domain.Models.Shape;
|
||||
@@ -11,17 +12,20 @@ public abstract class Shape
|
||||
|
||||
public WhiteboardId WhiteboardId { get; private set; }
|
||||
|
||||
public UserId AuthorId { get; private set; }
|
||||
|
||||
public abstract ShapeType ShapeType { get; }
|
||||
|
||||
public Position Position { get; private set; }
|
||||
|
||||
public Color Color { get; private set; }
|
||||
|
||||
protected Shape(ShapeId id, WhiteboardId whiteboardId, Position position, Color color)
|
||||
protected Shape(ShapeId id, WhiteboardId whiteboardId, UserId authorId, Position position, Color color)
|
||||
{
|
||||
Id = id;
|
||||
Position = position;
|
||||
Color = color;
|
||||
AuthorId = authorId;
|
||||
WhiteboardId = whiteboardId;
|
||||
}
|
||||
|
||||
@@ -29,8 +33,9 @@ public abstract class Shape
|
||||
string id,
|
||||
string whiteboardId,
|
||||
int positionX, int positionY,
|
||||
string color)
|
||||
string color, UserId authorId)
|
||||
{
|
||||
AuthorId = authorId;
|
||||
Id = new ShapeId(id);
|
||||
Position = new Position(positionX, positionY);
|
||||
Color = new Color(color);
|
||||
|
||||
Reference in New Issue
Block a user