Главная страница Случайная страница КАТЕГОРИИ: АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника |
Options for implementing required changes (TECHNICAL) ⇐ ПредыдущаяСтр 4 из 4
The Company Model currently looks like this: namespace InductionManager.Core.Models { public class Company { public int Id { get; set; }
public DateTime RegistrationDate { get; set; }
public int? ParentCompanyId { get; set; }
public int? LicenceTypeId { get; set; }
public CompanyStatus Status { get; set; }
public string Name { get; set; }
public string ContactName { get; set; }
public string ContactPhone { get; set; }
public string ContactEmail { get; set; }
public string Website { get; set; }
public string DefaultNotificationEmail { get; set; }
public string ReportNotificationEmail { get; set; }
public string Code { get; set; }
public DateTime? BillingDate { get; set; }
public string CryptoPassword { get; set; }
// Navigation properties public virtual ICollection< User> Users { get; set; }
public virtual Company ParentCompany { get; set; }
public virtual LicenceType LicenceType { get; set; }
public virtual ICollection< CompanyListItem> CompanyListItems { get; set; }
public virtual ICollection< CustomEmailTemplate> CustomEmails { get; set; } } } The requirements could be implemented by: 1. New “Contractor Model” in Core The Contractor Model would extend the Company Model. namespace InductionManager.Core.Models { public class Contractor: Company { // Additional properties /* ContractorTypeId – Self-Sufficient = 1 Subsidised = 0 */ public int ContractorTypeId { get; set; }
// Navigation properties
public virtual ContractorType ContractorType { get; set; } } } 2. Additional Properties on the “Company” Model The Company Model will be extended to look like the following: namespace InductionManager.Core.Models { public class Company { public int Id { get; set; }
public DateTime RegistrationDate { get; set; }
public int? ParentCompanyId { get; set; }
public int? LicenceTypeId { get; set; }
public CompanyStatus Status { get; set; }
public string Name { get; set; }
public string ContactName { get; set; }
public string ContactPhone { get; set; }
public string ContactEmail { get; set; }
public string Website { get; set; }
public string DefaultNotificationEmail { get; set; }
public string ReportNotificationEmail { get; set; }
public string Code { get; set; }
public DateTime? BillingDate { get; set; }
public string CryptoPassword { get; set; }
// Additional properties /* ContractorTypeId – Self-Sufficient = 1 Subsidised = 0 */ public int? ContractorTypeId { get; set; }
// Navigation properties public virtual ICollection< User> Users { get; set; }
public virtual Company ParentCompany { get; set; }
public virtual LicenceType LicenceType { get; set; }
public virtual ICollection< CompanyListItem> CompanyListItems { get; set; }
public virtual ICollection< CustomEmailTemplate> CustomEmails { get; set; }
// Additional properties public virtual ContractorType ContractorType { get; set; }
} }
|