28 lines
901 B
C#
28 lines
901 B
C#
|
using System;
|
|||
|
|
|||
|
namespace IT_Company.Entities
|
|||
|
{
|
|||
|
public class Contract
|
|||
|
{
|
|||
|
public int Id { get; set; }
|
|||
|
public int ExecutorId { get; set; }
|
|||
|
public int OrganizationId { get; set; }
|
|||
|
public int Price { get; set; }
|
|||
|
public DateTime Date { get; set; }
|
|||
|
public bool Paid { get; set; }
|
|||
|
public IEnumerable<ServicesContracts> ServicesContracts { get; private set; } = [];
|
|||
|
public static Contract CreateOperation(int id, int executorId, int organizationId, int price, IEnumerable<ServicesContracts> servicesContracts)
|
|||
|
{
|
|||
|
return new Contract
|
|||
|
{
|
|||
|
Id = id,
|
|||
|
ExecutorId = executorId,
|
|||
|
OrganizationId = organizationId,
|
|||
|
Price = price,
|
|||
|
Date = DateTime.Now,
|
|||
|
ServicesContracts = servicesContracts
|
|||
|
};
|
|||
|
}
|
|||
|
}
|
|||
|
}
|