revert c7e89630eb494454c1322bdf4cf29ab076af7b86
revert Models, DTOs (Data Transfer Objects), and view models have been created for the directory.
This commit is contained in:
parent
2002a79360
commit
2c20d49609
@ -1,11 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class Bucket : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
using System.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using Marco.Pms.Model.Employees;
|
|
||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class Contact : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid? ProjectId { get; set; }
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
public string Organization { get; set; } = string.Empty;
|
|
||||||
public string? Address { get; set; }
|
|
||||||
public bool IsActive { get; set; } = true;
|
|
||||||
public Guid CreatedById { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("CreatedById")]
|
|
||||||
public Employee? CreatedBy { get; set; }
|
|
||||||
|
|
||||||
[DisplayName("ContactCategoryId")]
|
|
||||||
public Guid? ContactCategoryId { get; set; }
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey(nameof(ContactCategoryId))]
|
|
||||||
public ContactCategoryMaster? ContactCategory { get; set; }
|
|
||||||
public DateTime CreatedAt { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class ContactBucketMapping
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid BucketId { get; set; }
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("BucketId")]
|
|
||||||
public Bucket? Bucket { get; set; }
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("ContactId")]
|
|
||||||
public Contact? Contact { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class ContactCategoryMaster : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
using System.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class ContactEmail
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Label { get; set; } = string.Empty;
|
|
||||||
public string EmailAddress { get; set; } = string.Empty;
|
|
||||||
[DisplayName("ContactId")]
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey(nameof(ContactId))]
|
|
||||||
public Contact? Contact { get; set; }
|
|
||||||
public bool IsPrimary { get; set; }
|
|
||||||
public Guid TenantId { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using Marco.Pms.Model.Employees;
|
|
||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class ContactNote : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Note { get; set; } = string.Empty;
|
|
||||||
public Guid CreatedById { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("CreatedById")]
|
|
||||||
public Employee? Createdby { get; set; }
|
|
||||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("ContactId")]
|
|
||||||
public Contact? Contact { get; set; }
|
|
||||||
public bool IsActive { get; set; } = true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
using System.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class ContactPhone
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Label { get; set; } = string.Empty;
|
|
||||||
public string PhoneNumber { get; set; } = string.Empty;
|
|
||||||
[DisplayName("ContactId")]
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey(nameof(ContactId))]
|
|
||||||
public Contact? Contact { get; set; }
|
|
||||||
public bool IsPrimary { get; set; }
|
|
||||||
|
|
||||||
public Guid TenantId { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class ContactTagMapping
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
public Contact? Contact { get; set; }
|
|
||||||
public Guid ContactTagtId { get; set; }
|
|
||||||
public ContactTagMaster? ContactTag { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class ContactTagMaster : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using Marco.Pms.Model.Employees;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class DirectoryUpdateLog
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid RefereanceId { get; set; }
|
|
||||||
public DateTime UpdateAt { get; set; } = DateTime.UtcNow;
|
|
||||||
public Guid UpdatedById { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("UpdatedById")]
|
|
||||||
public Employee? Employee { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using Marco.Pms.Model.Employees;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
|
||||||
{
|
|
||||||
public class EmployeeBucketMapping
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid BucketId { get; set; }
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("BucketId")]
|
|
||||||
public Bucket? Bucket { get; set; }
|
|
||||||
public Guid EmployeeId { get; set; }
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("EmployeeId")]
|
|
||||||
public Employee? Employee { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class CreateBucketDto
|
|
||||||
{
|
|
||||||
public string name { get; set; } = string.Empty;
|
|
||||||
public string description { get; set; } = string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class CreateContactDto
|
|
||||||
{
|
|
||||||
public Guid? ProjectId { get; set; }
|
|
||||||
public string? Name { get; set; }
|
|
||||||
public List<CreateContactPhoneDto>? ContactPhones { get; set; }
|
|
||||||
public List<CreateContactEmailDto>? ContactEmails { get; set; }
|
|
||||||
public Guid ContactCategoryId { get; set; }
|
|
||||||
public string? Description { get; set; }
|
|
||||||
public string? Organization { get; set; }
|
|
||||||
public string? Address { get; set; }
|
|
||||||
public List<Guid>? TagIds { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class CreateContactEmailDto
|
|
||||||
{
|
|
||||||
public string? Label { get; set; }
|
|
||||||
public string? EmailAddress { get; set; }
|
|
||||||
public Guid? ContactId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class CreateContactNoteDto
|
|
||||||
{
|
|
||||||
public string Note { get; set; } = string.Empty;
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class CreateContactPhoneDto
|
|
||||||
{
|
|
||||||
public string? Label { get; set; }
|
|
||||||
public string? PhoneNumber { get; set; }
|
|
||||||
public Guid? ContactId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class UpdateContactDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid? ProjectId { get; set; }
|
|
||||||
public string? Name { get; set; }
|
|
||||||
public List<UpdateContactPhoneDto>? ContactPhones { get; set; }
|
|
||||||
public List<UpdateContactEmailDto>? ContactEmails { get; set; }
|
|
||||||
public Guid ContactCategoryId { get; set; }
|
|
||||||
public string? Description { get; set; }
|
|
||||||
public string? Organization { get; set; }
|
|
||||||
public string? Address { get; set; }
|
|
||||||
public List<Guid>? TagIds { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class UpdateContactEmailDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string? Label { get; set; }
|
|
||||||
public string? EmailAddress { get; set; }
|
|
||||||
public Guid? ContactId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class UpdateContactNoteDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Note { get; set; } = string.Empty;
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Directory
|
|
||||||
{
|
|
||||||
public class UpdateContactPhoneDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string? Label { get; set; }
|
|
||||||
public string? PhoneNumber { get; set; }
|
|
||||||
public Guid? ContactId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Master
|
|
||||||
{
|
|
||||||
public class CreateContactCategoryDto
|
|
||||||
{
|
|
||||||
public string? Name { get; set; }
|
|
||||||
public string? Description { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Master
|
|
||||||
{
|
|
||||||
public class CreateContactTagDto
|
|
||||||
{
|
|
||||||
public string? Name { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Master
|
|
||||||
{
|
|
||||||
public class UpdateContactCategoryDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string? Name { get; set; }
|
|
||||||
public string? Description { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Master
|
|
||||||
{
|
|
||||||
public class UpdateContactTagDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string? Name { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,177 +0,0 @@
|
|||||||
using Marco.Pms.Model.Directory;
|
|
||||||
using Marco.Pms.Model.Dtos.Directory;
|
|
||||||
using Marco.Pms.Model.Dtos.Master;
|
|
||||||
using Marco.Pms.Model.ViewModels.Directory;
|
|
||||||
using Marco.Pms.Model.ViewModels.Master;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Mapper
|
|
||||||
{
|
|
||||||
public static class DirectoryMapper
|
|
||||||
{
|
|
||||||
public static Contact ToContactFromCreateContactDto(this CreateContactDto createContactDto, Guid tenantId)
|
|
||||||
{
|
|
||||||
|
|
||||||
return new Contact
|
|
||||||
{
|
|
||||||
ProjectId = createContactDto.ProjectId,
|
|
||||||
Name = createContactDto.Name ?? string.Empty,
|
|
||||||
ContactCategoryId = createContactDto.ContactCategoryId,
|
|
||||||
Description = createContactDto.Description ?? string.Empty,
|
|
||||||
Organization = createContactDto?.Organization ?? string.Empty,
|
|
||||||
Address = createContactDto != null ? createContactDto.Address : string.Empty,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static Contact ToContactFromUpdateContactDto(this UpdateContactDto updateContactDto, Guid tenantId)
|
|
||||||
{
|
|
||||||
|
|
||||||
return new Contact
|
|
||||||
{
|
|
||||||
Id = updateContactDto.Id,
|
|
||||||
ProjectId = updateContactDto.ProjectId,
|
|
||||||
Name = updateContactDto.Name ?? string.Empty,
|
|
||||||
ContactCategoryId = updateContactDto.ContactCategoryId,
|
|
||||||
Description = updateContactDto.Description ?? string.Empty,
|
|
||||||
Organization = updateContactDto?.Organization ?? string.Empty,
|
|
||||||
Address = updateContactDto != null ? updateContactDto.Address : string.Empty,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactVM ToContactVMFromContact(this Contact contact)
|
|
||||||
{
|
|
||||||
return new ContactVM
|
|
||||||
{
|
|
||||||
Id = contact.Id,
|
|
||||||
ProjectId = contact.ProjectId,
|
|
||||||
Name = contact.Name,
|
|
||||||
ContactType = contact.ContactCategory != null ? contact.ContactCategory.ToContactTypeVMFromContactTypeMaster() : new ContactCategoryVM(),
|
|
||||||
Description = contact.Description ?? string.Empty,
|
|
||||||
Organization = contact.Organization ?? string.Empty,
|
|
||||||
Address = contact.Address ?? string.Empty
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
//Contact Phone Mapper
|
|
||||||
public static ContactPhone ToContactPhoneFromCreateContactPhoneDto(this CreateContactPhoneDto createContactPhoneDto, Guid tenantId, Guid contactId)
|
|
||||||
{
|
|
||||||
return new ContactPhone
|
|
||||||
{
|
|
||||||
Label = createContactPhoneDto.Label ?? string.Empty,
|
|
||||||
PhoneNumber = createContactPhoneDto.PhoneNumber ?? string.Empty,
|
|
||||||
ContactId = contactId,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactPhone ToContactPhoneFromUpdateContactPhoneDto(this UpdateContactPhoneDto updateContactPhoneDto, Guid tenantId, Guid contactId)
|
|
||||||
{
|
|
||||||
return new ContactPhone
|
|
||||||
{
|
|
||||||
Id = updateContactPhoneDto.Id,
|
|
||||||
Label = updateContactPhoneDto.Label ?? string.Empty,
|
|
||||||
PhoneNumber = updateContactPhoneDto.PhoneNumber ?? string.Empty,
|
|
||||||
ContactId = contactId,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactPhoneVM ToContactPhoneVMFromContactPhone(this ContactPhone phone)
|
|
||||||
{
|
|
||||||
return new ContactPhoneVM
|
|
||||||
{
|
|
||||||
Id = phone.Id,
|
|
||||||
Label = phone.Label ?? string.Empty,
|
|
||||||
PhoneNumber = phone.PhoneNumber ?? string.Empty,
|
|
||||||
ContactId = phone.ContactId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
//Contact Email Mapper
|
|
||||||
public static ContactEmail ToContactEmailFromCreateContactEmailDto(this CreateContactEmailDto createContactEmailDto, Guid tenantId, Guid contactId)
|
|
||||||
{
|
|
||||||
return new ContactEmail
|
|
||||||
{
|
|
||||||
Label = createContactEmailDto.Label ?? string.Empty,
|
|
||||||
EmailAddress = createContactEmailDto.EmailAddress ?? string.Empty,
|
|
||||||
ContactId = contactId,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactEmail ToContactEmailFromUpdateContactEmailDto(this UpdateContactEmailDto updateContactEmailDto, Guid tenantId, Guid contactId)
|
|
||||||
{
|
|
||||||
return new ContactEmail
|
|
||||||
{
|
|
||||||
Id = updateContactEmailDto.Id,
|
|
||||||
Label = updateContactEmailDto.Label ?? string.Empty,
|
|
||||||
EmailAddress = updateContactEmailDto.EmailAddress ?? string.Empty,
|
|
||||||
ContactId = contactId,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactEmailVM ToContactEmailVMFromContactEmail(this ContactEmail email)
|
|
||||||
{
|
|
||||||
return new ContactEmailVM
|
|
||||||
{
|
|
||||||
Id = email.Id,
|
|
||||||
Label = email.Label ?? string.Empty,
|
|
||||||
EmailAddress = email.EmailAddress ?? string.Empty,
|
|
||||||
ContactId = email.ContactId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
//Contact Tag Mapper
|
|
||||||
public static ContactTagMaster ToContactTagMasterFromCreateContactTagDto(this CreateContactTagDto createContactTagDto, Guid tenantId)
|
|
||||||
{
|
|
||||||
return new ContactTagMaster
|
|
||||||
{
|
|
||||||
Name = createContactTagDto.Name ?? string.Empty,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactTagMaster ToContactTagMasterFromUpdateContactTagDto(this UpdateContactTagDto updateContactTagDto, Guid tenantId)
|
|
||||||
{
|
|
||||||
return new ContactTagMaster
|
|
||||||
{
|
|
||||||
Id = updateContactTagDto.Id,
|
|
||||||
Name = updateContactTagDto.Name ?? string.Empty,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactTagVM ToContactTagVMFromContactTagMaster(this ContactTagMaster contactTag)
|
|
||||||
{
|
|
||||||
return new ContactTagVM
|
|
||||||
{
|
|
||||||
Id = contactTag.Id,
|
|
||||||
Name = contactTag.Name ?? string.Empty,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
//Contact Category Mapper
|
|
||||||
public static ContactCategoryMaster ToContactCategoryMasterFromCreateContactCategoryDto(this CreateContactCategoryDto createContactTypeDto, Guid tenantId)
|
|
||||||
{
|
|
||||||
return new ContactCategoryMaster
|
|
||||||
{
|
|
||||||
Name = createContactTypeDto.Name ?? string.Empty,
|
|
||||||
Description = createContactTypeDto.Description ?? string.Empty,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactCategoryMaster ToContactCategoryMasterFromUpdateContactCategoryDto(this UpdateContactCategoryDto updateContactTypeDto, Guid tenantId)
|
|
||||||
{
|
|
||||||
return new ContactCategoryMaster
|
|
||||||
{
|
|
||||||
Id = updateContactTypeDto.Id,
|
|
||||||
Name = updateContactTypeDto.Name ?? string.Empty,
|
|
||||||
Description = updateContactTypeDto.Description ?? string.Empty,
|
|
||||||
TenantId = tenantId
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public static ContactCategoryVM ToContactCategoryVMFromContactCategoryMaster(this ContactCategoryMaster contactType)
|
|
||||||
{
|
|
||||||
return new ContactCategoryVM
|
|
||||||
{
|
|
||||||
Id = contactType.Id,
|
|
||||||
Name = contactType.Name ?? string.Empty,
|
|
||||||
Description = contactType.Description ?? string.Empty,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.ViewModels.Directory
|
|
||||||
{
|
|
||||||
public class ContactEmailVM
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string? Label { get; set; }
|
|
||||||
public string? EmailAddress { get; set; }
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.ViewModels.Directory
|
|
||||||
{
|
|
||||||
public class ContactPhoneVM
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string? Label { get; set; }
|
|
||||||
public string? PhoneNumber { get; set; }
|
|
||||||
public Guid ContactId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
using Marco.Pms.Model.ViewModels.Master;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.ViewModels.Directory
|
|
||||||
{
|
|
||||||
public class ContactVM
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid? ProjectId { get; set; }
|
|
||||||
public string? Name { get; set; }
|
|
||||||
public List<ContactPhoneVM>? ContactPhones { get; set; }
|
|
||||||
public List<ContactEmailVM>? ContactEmails { get; set; }
|
|
||||||
public ContactCategoryVM? ContactType { get; set; }
|
|
||||||
public string? Description { get; set; }
|
|
||||||
public string? Organization { get; set; }
|
|
||||||
public string? Address { get; set; }
|
|
||||||
public List<ContactTagVM>? Tags { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.ViewModels.Master
|
|
||||||
{
|
|
||||||
public class ContactCategoryVM
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string? Name { get; set; }
|
|
||||||
public string? Description { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.ViewModels.Master
|
|
||||||
{
|
|
||||||
public class ContactTagVM
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string? Name { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user