(deftemplate Employee
(slot employee-id)
(slot employee-name)
(slot Role)
(slot Designation))
(deffacts Employees
(employee (employee-name X) (employee-id 1) (Role CS) (Designation TA))
(employee (employee-name Y) (employee-id 2) (Role CS) (Designation SA))
(employee (employee-name Z) (employee-id 3) (Role CIS) (Designation TA))
(employee (employee-name W) (employee-id 4) (Role SE) (Designation SA))
(employee (employee-name Q) (employee-id 5) (Role CIS) (Designation TA))
(employee (employee-name U) (employee-id 1) (Role CS) (Designation TA)))
In above example, I have entered employee id twice. How can I define employee id to be unique?