Api/Brizco.Domain/Entities/Task/Task.cs

64 lines
2.0 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 )]
[AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
[GenerateMapper]
public partial class Task : ApiEntity
{
public Task()
{
}
internal Task(
TaskType type,
bool isDisposable,
DateTime setFor,
bool hasDisposed,
int amount,
PurchaseAmountType amountType,
string title,
string description,
Guid complexId,
TaskScheduleType scheduleType)
{
Type = type;
IsDisposable = isDisposable;
SetFor = setFor;
HasDisposed = hasDisposed;
Amount = amount;
AmountType = amountType;
Title = title;
Description = description;
ComplexId = complexId;
ScheduleType = scheduleType;
}
public TaskType Type { get; internal set; }
public string Title { get; internal set; } = string.Empty;
public string Description { get; internal set; } = string.Empty;
public bool IsDisposable { get; internal set; }
public DateTime SetFor { get; internal set; }
public bool HasDisposed { get; internal set; }
public TaskScheduleType ScheduleType { get; set; }
public Guid ComplexId { get; set; }
public Complex.Complex? Complex { get; set; }
public bool IsActivity { get; set; }
public int Amount { get; internal set; }
public PurchaseAmountType AmountType { get; internal set; }
public List<TaskShift> Shifts { get; internal set; } = new();
public List<TaskDay> Days { get; internal set; } = new();
public List<TaskRoutine> Routines { get; internal set; } = new();
public List<TaskPosition> Positions { get; internal set; } = new();
}