83 lines
2.3 KiB
C#
83 lines
2.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Security.AccessControl;
|
|
using _0_Framework.Domain;
|
|
using AccountManagement.Domain.AssignAgg;
|
|
using AccountManagement.Domain.TaskMediaAgg;
|
|
using AccountManagement.Domain.TaskScheduleAgg;
|
|
|
|
namespace AccountManagement.Domain.TaskAgg;
|
|
|
|
public class Tasks : EntityBase
|
|
{
|
|
public Tasks(string title, string? description, long senderId, string contractingPartyName)
|
|
{
|
|
Title = title;
|
|
|
|
Description = description;
|
|
SenderId = senderId;
|
|
ContractingPartyName = contractingPartyName;
|
|
StartTaskDate = DateTime.Now;
|
|
IsActiveString = "true";
|
|
TaskScheduleId = null;
|
|
}
|
|
//عنوان وظیفه
|
|
public string Title { get; private set; }
|
|
//زمان ارسال وظیفه
|
|
public DateTime StartTaskDate { get; private set; }
|
|
//توضیحات وظیفه
|
|
public string? Description { get; private set; }
|
|
//آیدی شخص ارسال کننده
|
|
public long SenderId { get; private set; }
|
|
//نام طرف حساب
|
|
public string ContractingPartyName { get; set; }
|
|
|
|
public string IsActiveString { get; private set; }
|
|
|
|
public long? TicketId { get; private set; }
|
|
|
|
public long? TaskScheduleId { get; private set; }
|
|
|
|
public List<Assign> Assigns { get; set; }
|
|
public List<TaskMedia> TaskMedias { get; set; }
|
|
public TaskSchedule TaskSchedule { get; set; }
|
|
|
|
|
|
public Tasks(string title, string? description, long senderId, string contractingPartyName, long ticketId)
|
|
{
|
|
Title = title;
|
|
Description = description;
|
|
SenderId = senderId;
|
|
ContractingPartyName = contractingPartyName;
|
|
StartTaskDate = DateTime.Now;
|
|
IsActiveString = "true";
|
|
TicketId = ticketId;
|
|
}
|
|
|
|
public void Edit(string title, string? description, long senderId, string contractingPartyName)
|
|
{
|
|
Title = title;
|
|
Description = description;
|
|
SenderId = senderId;
|
|
ContractingPartyName = contractingPartyName;
|
|
}
|
|
|
|
|
|
//برای ایجاد یک درخواست مهلت
|
|
|
|
public void DeActive()
|
|
{
|
|
IsActiveString = "false";
|
|
}
|
|
|
|
public void Activator()
|
|
{
|
|
IsActiveString = "true";
|
|
}
|
|
|
|
public void SetTaskSchedule(long taskScheduleId)
|
|
{
|
|
TaskScheduleId = taskScheduleId;
|
|
}
|
|
|
|
} |