Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dselman committed Apr 6, 2017
1 parent 26ea709 commit 4a7cd8c
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions packages/vehicle-lifecycle-model/models/vehicle.cto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

0 comments on commit 4a7cd8c

Please # to comment.