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

64 lines
2.0 KiB
C#
Raw Normal View History

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
2023-09-15 12:37:02 +03:30
{
public Task()
{
}
internal Task(
TaskType type,
bool isRelatedToRole,
bool isRelatedToPerson,
bool isDisposable,
DateTime setFor,
bool hasDisposed,
int amount,
PurchaseAmountType amountType,
string title,
string description,
Guid complexId)
2023-09-15 12:37:02 +03:30
{
Type = type;
IsRelatedToRole = isRelatedToRole;
IsRelatedToPerson = isRelatedToPerson;
IsDisposable = isDisposable;
SetFor = setFor;
HasDisposed = hasDisposed;
Amount = amount;
AmountType = amountType;
Title = title;
Description = description;
ComplexId = complexId;
2023-09-15 12:37:02 +03:30
}
public TaskType Type { get; internal set; }
public string Title { get; internal set; } = string.Empty;
public string Description { get; internal set; } = string.Empty;
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; }
2023-09-15 12:37:02 +03:30
public List<TaskUser> Users { get; internal set; } = new();
2023-09-15 12:37:02 +03:30
public List<TaskShift> Shifts { get; internal set; } = new();
2023-09-15 12:37:02 +03:30
public List<TaskDay> Days { get; internal set; } = new();
2023-10-13 16:25:34 +03:30
public List<TaskRole> Roles { get; internal set; } = new();
2023-09-15 12:37:02 +03:30
}