using System; using System.Collections.Generic; using System.Collections.ObjectModel; namespace VidFilesUpgradeTool { class TerminalRecord : Entity { public TerminalInfo Terminal { get; set; } public OrganizationInfo Organization { get; set; } public UserInfo User { get; set; } public StorageServerInfo StorageServer { get; set; } public string Description { get; set; } public ICollection AdminShared { get; set; } public ICollection UserAssigned { get; set; } public string ExamId { get; set; } public string AccessionNumber { get; set; } public PatientDocInfo PatientInfo { get; set; } public TerminalRecord() : base() { AdminShared = new Collection(); UserAssigned = new Collection(); } } class FinishedTerminalRecord:Entity { public TerminalInfo Terminal { get; set; } public OrganizationInfo Organization { get; set; } public UserInfoWithType User { get; set; } public PatientDocInfo PatientInfo { get; set; } public string TerminalRecordId { get; set; } } class UserInfoWithType : EntityInfo { public UserTypes UserType { get; set; } } class TerminalInfo : EntityDescriptionInfo { public string OrganizationId { get; set; } public bool IsShared { get; set; } } class OrganizationInfo : EntityDescriptionInfo { public bool IsShared { get; set; } } class StorageServerInfo { public string Id { get; set; } public string Address { get; set; } public int Port { get; set; } public string Description { get; set; } } class AdminInfo : EntityInfo { } class PatientDocInfo { public string IdentityCardId { get; private set; } public string FirstName { get; private set; } public string LastName { get; private set; } public DateTime? Birthday { get; set; } public GenderType GenderType { get; set; } } enum GenderType { Unassigned, Male, Female } /// /// Account all user types /// enum UserTypes { /// /// common user /// Normal, /// /// expert user /// Expert, /// /// Review patient report user /// Reviewer, /// /// work sheet user /// NUs WorkOrder, /// /// after sale sevice user /// Service, /// /// after sale agent user /// SalesAgent } class EntityInfo { public string Id { get; set; } public string Name { get; set; } } class EntityDescriptionInfo : EntityInfo { public string Description { get; set; } } }