March 2018
Intermediate to advanced
380 pages
9h 23m
English
Let's start by defining our entities:
/** Product sold by the Online store */entity Product { name String required description String price BigDecimal required min(0) size Size required image ImageBlob}enum Size { S, M, L, XL, XXL}entity ProductCategory { name String required description String}
The Product entity is the core of the domain model; it holds product information such as name, description, price, size, and image which is a Blob. name, price, and size are required fields. price also has a min value validation. The size field is an enum with defined values.
The ProductCategory entity is used to group products together. It has name