/* **************** * * * ENTITIES * * ******** * * * **************** */ entity Product { name String required unique minlength(2) maxlength(90) price Float required min(0) description TextBlob required picture ImageBlob required specification Blob category ProductCategory inventory Integer required min(0) } enum ProductCategory { Laptop, Desktop, Phone, Tablet, Accessory } entity Address { addressLine1 String required minlength(2) maxlength(80) addressLine2 String minlength(2) maxlength(80) city String minlength(2) maxlength(80) postalCode String minlength(5) maxlength(5) } entity ShoppingOrder { name String required unique minlength(2) maxlength(90) totalAmount Float min(0) ordered ZonedDateTime } entity ProductOrder { amount Integer required min(0) max(5) } entity Shipment { shippedAt ZonedDateTime required } /* ********************* * * * RELATIONSHIPS * * ************* * * * ********************* */ relationship OneToOne { Shipment{order(name) required} to ShoppingOrder{shipment(shippedAt) required} } relationship OneToMany { Product{order(name) required} to ProductOrder{product(name) required} ShoppingOrder{orders required} to ProductOrder{overallOrder(name)} } relationship ManyToOne { Address{user(login) required} to User ProductOrder{buyer(login) required} to User ShoppingOrder{buyer(login) required} to User Shipment{shippedBy(login) required} to User } /* **************************** * * * ENTITY CONFIGURATION * * ******************** * * * **************************** */ paginate * with pagination service * with serviceImpl dto * with mapstruct