entity Products{
key productID : UUID;
productName : String;
// info about the company which creates the product
supplierCompanyName : String;
supplierCity : String;
supplierStreet : String;
supplierStreetNumber : Integer;
// info about the employee who sells the product
responsibleEmployeeName : String;
responsibleCity : String;
responsibleStreet : String;
responsibleStreetNumber : Integer;
// info about the customer who buys the product
deliveryCustomerName : String;
deliveryCustomerCity : String;
deliveryCustomerStreet : String;
deliveryCustomerStreetNumber : Integer;
}
type AddressType {
city : String;
street : String;
streetNumber : Integer;
}
entity ProductEntity{
key productID : UUID;
productName : String;
// info about the company which creates the product
supplierCompanyName : String;
supplierAddress : AddressType;
// info about the employee who sells the product
responsibleEmployeeName : String;
responsibleEmployeeAddress : AddressType;
// info about the customer who buys the product
deliveryCustomerName : String;
deliveryCustomerAddress : AddressType;
}
type priceDecimal : Decimal(9, 2);
type averageDecimal : Decimal(11, 1);
type limitDecimal : Decimal(1,5);
entity PharmProductEntity {
key id : String;
orderPrice : priceDecimal;
sellingPrice : priceDecimal;
averageCount : averageDecimal;
toxLimit : limitDecimal;
}
type AddressType {
city : String;
street : String;
streetNumber : Integer;
}
entity CustomerEntity {
key id : String;
name : String;
contact : {
homepage : String;
email : String;
address : AddressType;
};
company : String;
}
service ProductService{
type priceDecimal : Decimal(9, 2);
type averageDecimal : Decimal(11, 1);
type limitDecimal : Decimal(6, 5);
type AddressType {
city : String;
street : String;
streetNumber : Integer;
}
entity ProductEntity{
key productID : UUID;
productName : String;
supplierCompanyName : String;
supplierAddress : AddressType;
responsibleEmployeeName : String;
responsibleEmployeeAddress : AddressType;
deliveryCustomerName : String;
deliverCustomerAddress : AddressType;
}
entity PharmProductEntity {
key id : String;
orderPrice : priceDecimal;
sellingPrice : priceDecimal;
averageCount : averageDecimal;
toxLimit : limitDecimal;
}
entity CustomerEntity {
key id : String;
name : String;
contact : {
homepage : String;
email : String;
address : AddressType;
};
company : String;
}
}
<EntityType Name="ProductEntity">
<Key>
<PropertyRef Name="productID"/>
</Key>
<Property Name="productID" Type="Edm.Guid" Nullable="false"/>
<Property Name="productName" Type="Edm.String"/>
<Property Name="supplierCompanyName" Type="Edm.String"/>
<Property Name="responsibleEmployeeName" Type="Edm.String"/>
<Property Name="deliveryCustomerName" Type="Edm.String"/>
<Property Name="supplierAddress_city" Type="Edm.String"/>
<Property Name="supplierAddress_street" Type="Edm.String"/>
<Property Name="supplierAddress_streetNumber" Type="Edm.Int32"/>
<Property Name="responsibleEmployeeAddress_city" Type="Edm.String"/>
<Property Name="responsibleEmployeeAddress_street" Type="Edm.String"/>
<Property Name="responsibleEmployeeAddress_streetNumber" Type="Edm.Int32"/>
<Property Name="deliveryCustomerAddress_city" Type="Edm.String"/>
<Property Name="deliveryCustomerAddress_street" Type="Edm.String"/>
<Property Name="deliveryCustomerAddress_streetNumber" Type="Edm.Int32"/>
</EntityType>
<EntityType Name="PharmProductEntity">
<Key>
<PropertyRef Name="id"/>
</Key>
<Property Name="id" Type="Edm.String" Nullable="false"/>
<Property Name="orderPrice" Type="Edm.Decimal" Precision="9" Scale="2"/>
<Property Name="sellingPrice" Type="Edm.Decimal" Precision="9" Scale="2"/>
<Property Name="averageCount" Type="Edm.Decimal" Precision="11" Scale="1"/>
<Property Name="toxLimit" Type="Edm.Decimal" Precision="6" Scale="5"/>
</EntityType>
<EntityType Name="CustomerEntity">
<Key>
<PropertyRef Name="id"/>
</Key>
<Property Name="id" Type="Edm.String" Nullable="false"/>
<Property Name="name" Type="Edm.String"/>
<Property Name="company" Type="Edm.String"/>
<Property Name="contact_homepage" Type="Edm.String"/>
<Property Name="contact_email" Type="Edm.String"/>
<Property Name="contact_address_city" Type="Edm.String"/>
<Property Name="contact_address_street" Type="Edm.String"/>
<Property Name="contact_address_streetNumber" Type="Edm.Int32"/>
</EntityType>
service ProductService{
// type definitions
type priceDecimal : Decimal(9, 2);
type averageDecimal : Decimal(11, 1);
type limitDecimal : Decimal(6, 5);
type AddressType {
city : String;
street : String;
streetNumber : Integer;
}
// example for using custom structure type
entity ProductEntity{
key productID : UUID;
productName : String;
// info about the company which creates the product
supplierCompanyName : String;
supplierAddress : AddressType;
// info about the employee who sells the product
responsibleEmployeeName : String;
responsibleEmployeeAddress : AddressType;
// info about the customer who buys the product
deliveryCustomerName : String;
deliverCustomerAddress : AddressType;
}
// example for using simple type definitions
entity PharmProductEntity {
key id : String;
orderPrice : priceDecimal;
sellingPrice : priceDecimal;
averageCount : averageDecimal;
toxLimit : limitDecimal;
}
// example for inline custom type definition syntax
entity CustomerEntity {
key id : String;
name : String;
contact : {
homepage : String;
email : String;
address : AddressType;
}; // note: don't forget this colon after property definition 😉
company : String;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
7 | |
7 | |
7 | |
7 | |
6 | |
5 |