January 2020
Intermediate to advanced
428 pages
10h 34m
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 the name, description, price, size, and image, which is a blob. The name, price, and size are required fields. The price also has a minimum value validation. The size field is an enum with defined values.
The ProductCategory entity is used to group products together. ...
Read now
Unlock full access