64 lines
1.9 KiB
C#
64 lines
1.9 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 StopVipService()
|
|
{
|
|
IsActiveString = "false";
|
|
EndService = DateTime.Now;
|
|
}
|
|
|
|
public void DeActive()
|
|
{
|
|
IsActiveString = "false";
|
|
}
|
|
public void Active()
|
|
{
|
|
IsActiveString = "true";
|
|
}
|
|
} |