67 lines
2.1 KiB
C#
67 lines
2.1 KiB
C#
using Brizco.Domain.Entities.Shift;
|
|
|
|
namespace Brizco.Domain.Entities.Task;
|
|
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
|
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
|
[GenerateMapper]
|
|
public partial class Task : ApiEntity
|
|
{
|
|
public Task()
|
|
{
|
|
|
|
}
|
|
internal Task(
|
|
TaskType type,
|
|
bool isRelatedToShift,
|
|
bool isRelatedToRole,
|
|
bool isRelatedToPerson,
|
|
bool isDisposable,
|
|
DateTime setFor,
|
|
bool hasDisposed,
|
|
int amount,
|
|
PurchaseAmountType amountType,
|
|
string title,
|
|
string description,
|
|
Guid complexId)
|
|
{
|
|
Type = type;
|
|
IsRelatedToShift = isRelatedToShift;
|
|
IsRelatedToRole = isRelatedToRole;
|
|
IsRelatedToPerson = isRelatedToPerson;
|
|
IsDisposable = isDisposable;
|
|
SetFor = setFor;
|
|
HasDisposed = hasDisposed;
|
|
Amount = amount;
|
|
AmountType = amountType;
|
|
Title = title;
|
|
Description = description;
|
|
ComplexId = complexId;
|
|
}
|
|
|
|
public TaskType Type { get; internal set; }
|
|
public string Title { get; internal set; } = string.Empty;
|
|
public string Description { get; internal set; } = string.Empty;
|
|
public bool IsRelatedToShift { get; internal set; }
|
|
public bool IsRelatedToRole { get; internal set; }
|
|
public bool IsRelatedToPerson { get; internal set; }
|
|
public bool IsDisposable { get; internal set; }
|
|
public DateTime SetFor { get; internal set; }
|
|
public bool HasDisposed { get; internal set; }
|
|
|
|
public Guid ComplexId { get; set; }
|
|
public Complex.Complex? Complex { get; set; }
|
|
|
|
|
|
public int Amount { get; internal set; }
|
|
public PurchaseAmountType AmountType { get; internal set; }
|
|
|
|
|
|
public List<TaskUser> Users { get; internal set; } = new();
|
|
|
|
public List<TaskShift> Shifts { get; internal set; } = new();
|
|
|
|
public List<TaskDay> Days { get; internal set; }
|
|
|
|
public List<TaskRole> Roles { get; internal set; } = new();
|
|
}
|