Files
Backend-Api/Company.Domain/RollCallServiceAgg/RollCallService.cs
2024-07-05 21:36:15 +03:30

58 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using _0_Framework.Domain;
using AccountManagement.Domain.AccountAgg;
using Company.Domain.WorkshopAgg;
namespace Company.Domain.RollCallServiceAgg;
public class RollCallService : EntityBase
{
public RollCallService(string serviceType, DateTime startService, DateTime endService, long workshopId, long accountId, int maxPersonValid, double amount, string duration)
{
ServiceType = serviceType;
StartService = startService;
EndService = endService;
WorkshopId = workshopId;
AccountId = accountId;
MaxPersonValid = maxPersonValid;
Amount = amount;
Duration = duration;
IsActiveString = "true";
}
public string ServiceType { get; private set; }
public DateTime StartService { get; private set; }
public DateTime EndService { get; private set; }
public long WorkshopId { get; private set; }
public long AccountId { get; private set; }
public string IsActiveString { get; private set; }
public int MaxPersonValid { get; private set; }
public double Amount { get; private set; }
public string Duration { get; private set; }
public Workshop Workshop { get; set; }
public void UpgradeService(string serviceType, DateTime startService, DateTime endService, int maxPersonValid,
double amount, string duration)
{
ServiceType = serviceType;
StartService = startService;
EndService = endService;
MaxPersonValid = maxPersonValid;
Amount = amount;
Duration = duration;
}
public void DeActive()
{
IsActiveString = "false";
}
public void Active()
{
IsActiveString = "true";
}
}