new comments in extension sample
This commit is contained in:
@@ -9,12 +9,14 @@ using {
|
|||||||
|
|
||||||
namespace sap.bookshop.extension;
|
namespace sap.bookshop.extension;
|
||||||
|
|
||||||
|
// extend existing entity
|
||||||
extend orders.Orders with {
|
extend orders.Orders with {
|
||||||
Customer : Association to one Customers;
|
Customer : Association to one Customers;
|
||||||
Remarks : Composition of many Remarks on Remarks.parent = $self;
|
Remarks : Composition of many Remarks on Remarks.parent = $self;
|
||||||
priority : String @assert.range enum {high; medium; low} default 'medium';
|
priority : String @assert.range enum {high; medium; low} default 'medium';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// new entity - as association target
|
||||||
entity Customers : cuid, managed {
|
entity Customers : cuid, managed {
|
||||||
email : String;
|
email : String;
|
||||||
firstName : String;
|
firstName : String;
|
||||||
@@ -32,6 +34,7 @@ annotate Customers with @assert.unique: { email: [ email ] }
|
|||||||
email @mandatory; // mandatory check
|
email @mandatory; // mandatory check
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// new entity - as composition target
|
||||||
entity CustomerPostalAddresses : cuid, managed {
|
entity CustomerPostalAddresses : cuid, managed {
|
||||||
Customer : Association to one Customers;
|
Customer : Association to one Customers;
|
||||||
description : String;
|
description : String;
|
||||||
@@ -40,6 +43,7 @@ entity CustomerPostalAddresses : cuid, managed {
|
|||||||
country : Country;
|
country : Country;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// new entity - as composition target
|
||||||
entity Remarks : cuid, managed
|
entity Remarks : cuid, managed
|
||||||
{
|
{
|
||||||
parent : Association to one orders.Orders;
|
parent : Association to one orders.Orders;
|
||||||
|
|||||||
Reference in New Issue
Block a user