From 4a7cd8c3c40ef4498ca9a2b6361fa47385109efe Mon Sep 17 00:00:00 2001 From: Dan Selman Date: Thu, 6 Apr 2017 20:12:40 +0100 Subject: [PATCH] Updated --- .../models/vehicle.cto | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/vehicle-lifecycle-model/models/vehicle.cto b/packages/vehicle-lifecycle-model/models/vehicle.cto index 44296cf..efd9d27 100644 --- a/packages/vehicle-lifecycle-model/models/vehicle.cto +++ b/packages/vehicle-lifecycle-model/models/vehicle.cto @@ -22,19 +22,26 @@ import composer.business.Business enum VehicleStatus { o CREATED + o AUTHORIZED o SCRAPPED } -asset Vehicle identified by VIN { - o String VIN +concept VehicleDetails { o String numberPlate optional o String model + o String make o String colour o String v5cid optional o Double co2Rating +} + +asset Vehicle identified by VIN { + o String VIN + o VehicleDetails vehicleDetails + o VehicleStatus vehicleStatus --> Manufacturer manufacturer - --> PrivateOwner person optional - --> CompanyOwner company optional + --> PrivateOwner privateOwner optional + --> CompanyOwner companyOwner optional } participant PrivateOwner identified by email extends Person { @@ -62,10 +69,16 @@ participant AuctionHouse extends CompanyOwner { participant ScrapMerchant extends CompanyOwner { } +transaction ManufactureVehicle identified by transactionID { + o String transactionID + o String vin + o VehicleDetails vehicleDetails +} + transaction Authorise identified by transactionID { o String transactionID --> Regulator regulator - --> CompanyOwner manufacturer + --> Manufacturer manufacturer --> Vehicle vehicle } @@ -81,8 +94,12 @@ transaction PrivateTransfer identified by transactionID { --> PrivateOwner privateOwner } -transaction ScrapCar identified by transactionID { +transaction ScrapVehicle identified by transactionID { o String transactionID --> Vehicle vehicle --> ScrapMerchant scrapMerchant } + +transaction SetupDemo identified by transactionID { + o String transactionID +}