datasource maindb sql "Data Source=.\SQLEXPRESS;AttachDbFilename=$(datapath)\ProjectManager.mdf;Integrated Security=True;User Instance=True" enum MailDirection { Incoming = 0 Outgoing = 1 } enum ContactType { Any = 0 User = 1 Company = 2 Supplier = 3 Customer = 4 } enum TaskState { NotStart = 0 InProgress = 1 Completed = 2 Waiting = 3 Postpone = 4 } enum DocumentState { New = 0 Checked = 1 Archived = 2 } enum MailState { New = 0 Read = 1 } enum MessageState { Waiting = 0 Viewed = 1 Completed = 2 } enum RealtyType { Office = 0 Apartment = 1 Box = 2 Basement = 3 } enum SystemRole { None = 0 Owner = 1 Delegate = 2 } entity Role { Name Text(32) Description Text DefaultAllow Int DefaultDeny Int SystemRole SystemRole } entity User { Username Text(32) Password Text(32) Enabled Bool LastActivityDate Date DefaultRole ref Role Info ref Contact } entity Address { Street Text(50) Cap Text(5) City Text(30) District Text(2) } entity Contact { Name Text(64) Code Text(20) WebSite Text(64) EMail Text(64) OfficePhone Text(32) MobilePhone Text(32) OtherPhone Text(32) Fax Text(32) OfficeAddress Address Note Text Category Text(64) Referring Text(64) Type ContactType } entity Container { Name Text(32) Description Text Type Text(32) Objects listof ContainerObject } entity ContainerObject { Id Int Type Text(32) Storage Text(256) InheritPermissions Bool Permissions listof Permission RelatedContacts listof ref Contact } entity Permission { User ref User Role ref Role ObjectType Text(32) Allow Int Deny Int } entity Mail { Date Date From ref Contact To listof ref Contact Subject Text(256) Text Text State MailState Direction MailDirection Type Text(32) Code Text(16) FileName Text(256) } entity DocumentHistory { Date Date Version Text(16) Comment Text(256) } entity Document { Name Text(64) Code Text(32) Location Text(64) Type Text(32) State DocumentState Description Text Version Text(16) CreationTime Date LastAccessTime Date LastWriteTime Date FileName Text(256) History listof DocumentHistory } entity Task { Name Text(64) State TaskState StartDate Date InsertDate Date EndDate Date ExpiryDate Date Priority Int(1) Percentage Int(1) ExpectedWork Int EffectiveWork Int AlertTime Int DependentTask listof ref Task Tickets listof Message } entity Message { Date Date From ref User To listof ref User Subject Text(256) Text Text State MessageState } entity Realty { Type RealtyType } dataset ProjectManagerDataset { table of Container Containers in maindb table of Contact Contacts in maindb table of User Users in maindb table of Role Roles in maindb table of Document Documents in maindb table of Task Tasks in maindb table of Mail Mails in maindb table of Realty Realties in maindb }