examples/CQL/CompanyDirectorEmployee.cql in activefacts-0.8.18 vs examples/CQL/CompanyDirectorEmployee.cql in activefacts-1.0.0
- old
+ new
@@ -13,10 +13,19 @@
*/
Company is identified by its Name where
Company is called Company Name;
Company is listed;
+Employee is identified by its Nr;
+Employee works at one Company,
+ Company employs Employee;
+
+Manager is a kind of Employee;
+Employee is supervised by at most one Manager [acyclic],
+ Manager supervises Employee;
+Manager is ceo;
+
Meeting is independent identified by Company and Date and Meeting is board meeting where
Meeting is held by one Company,
Company held Meeting,
Meeting is held on one Date,
Meeting is board meeting;
@@ -35,17 +44,12 @@
Directorship is where
Person (as Director) directs Company,
Company is directed by at least one Director;
Directorship began on one appointment-Date;
-Employee is a kind of Person identified by its Nr;
-Employee works at one Company,
- Company employs Employee;
-
-Manager is a kind of Employee;
-Employee is supervised by at most one Manager [acyclic],
- Manager supervises Employee;
-Manager is ceo;
+Employment is where
+ Person works as Employee,
+ Employee role is assigned to at least one Person;
/*
* Constraints:
*/
either Employee is supervised by Manager(1) or Employee is a Manager(2) that is ceo but not both;