using System; using System.Collections.Generic; using IdentityServer4.Extensions; using InternshipSystem.Core; using InternshipSystem.Core.Entity.Internship; namespace InternshipSystem.Api.Commands { public class UpdateRegistrationForm { public UpdateCompany? Company { get; set; } public DateTime? Start { get; set; } public DateTime? End { get; set; } public UpdateMentor? Mentor { get; set; } public List Subjects { get; set; } public long? Type { get; set; } } public struct UpdateMentor { public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } public string PhoneNumber { get; set; } } public struct UpdateCompany { public long? Id { get; set; } public string Nip { get; set; } public string Name { get; set; } public UpdateBranchOffice? BranchOffice { get; set; } public bool IsCustomUpdate => !Nip.IsNullOrEmpty() || !Name.IsNullOrEmpty(); } public struct UpdateBranchOffice { public long? Id { get; set; } public string Street { get; set; } public string Building { get; set; } public string City { get; set; } public string PostalCode { get; set; } public string Country { get; set; } public bool IsCustomUpdate => !string.IsNullOrEmpty(Street) || !string.IsNullOrEmpty(Building) || !string.IsNullOrEmpty(City) || !string.IsNullOrEmpty(PostalCode) || !string.IsNullOrEmpty(Country); } }