Files
cloud-cap-samples/fiori-ext/node_modules/@capire/fiori/index.csn
2022-08-29 16:36:36 +02:00

4370 lines
96 KiB
Plaintext

{
"definitions": {
"sap.capire.bookshop.GenreHierarchy": {
"kind": "entity",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"includes": [
"sap.capire.bookshop.Genres"
],
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"hierarchyLevel": {
"type": "cds.Integer",
"default": {
"val": 0
}
},
"drillState": {
"type": "cds.String",
"default": {
"val": "leaf"
}
},
"parent": {
"type": "cds.Association",
"target": "sap.capire.bookshop.GenreHierarchy",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"children": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.capire.bookshop.GenreHierarchy",
"on": [
{
"ref": [
"children",
"parent"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.capire.bookshop.GenreHierarchy.texts",
"on": [
{
"ref": [
"texts",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.capire.bookshop.GenreHierarchy.texts",
"on": [
{
"ref": [
"localized",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"CatalogService.GenreHierarchy": {
"kind": "entity",
"@readonly": true,
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.GenreHierarchy"
]
}
},
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"hierarchyLevel": {
"type": "cds.Integer",
"default": {
"val": 0
}
},
"drillState": {
"type": "cds.String",
"default": {
"val": "leaf"
}
},
"parent": {
"type": "cds.Association",
"target": "CatalogService.GenreHierarchy",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"children": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "CatalogService.GenreHierarchy",
"on": [
{
"ref": [
"children",
"parent"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "CatalogService.GenreHierarchy.texts",
"on": [
{
"ref": [
"texts",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "CatalogService.GenreHierarchy.texts",
"on": [
{
"ref": [
"localized",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"sap.common.countries": {
"kind": "context"
},
"sap.common.countries.Regions": {
"kind": "entity",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"includes": [
"sap.common.CodeList"
],
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"key": true,
"type": "cds.String",
"length": 5
},
"children": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.countries.Regions",
"on": [
{
"ref": [
"children",
"_parent"
]
},
"=",
{
"ref": [
"$self",
"code"
]
}
]
},
"cities": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.countries.Cities",
"on": [
{
"ref": [
"cities",
"region"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"_parent": {
"type": "cds.String",
"length": 11
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.countries.Regions.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.common.countries.Regions.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"sap.common.countries.Cities": {
"kind": "entity",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"includes": [
"sap.common.CodeList"
],
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"key": true,
"type": "cds.String",
"length": 11
},
"region": {
"type": "cds.Association",
"target": "sap.common.countries.Regions",
"keys": [
{
"ref": [
"code"
]
}
]
},
"districts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.countries.Districts",
"on": [
{
"ref": [
"districts",
"city"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.countries.Cities.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.common.countries.Cities.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"sap.common.countries.Districts": {
"kind": "entity",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"includes": [
"sap.common.CodeList"
],
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"key": true,
"type": "cds.String",
"length": 11
},
"city": {
"type": "cds.Association",
"target": "sap.common.countries.Cities",
"keys": [
{
"ref": [
"code"
]
}
]
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.countries.Districts.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.common.countries.Districts.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"sap.capire.bookshop.Books": {
"kind": "entity",
"includes": [
"managed"
],
"elements": {
"createdAt": {
"@cds.on.insert": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"createdBy": {
"@cds.on.insert": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedBy": {
"@cds.on.insert": {
"=": "$user"
},
"@cds.on.update": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"title": {
"localized": true,
"type": "cds.String",
"length": 111
},
"descr": {
"localized": true,
"type": "cds.String",
"length": 1111
},
"author": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Authors",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"genre": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Genres",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"stock": {
"type": "cds.Integer"
},
"price": {
"type": "cds.Decimal"
},
"currency": {
"@title": "{i18n>Currency}",
"@description": "{i18n>CurrencyCode.Description}",
"type": "Currency",
"target": "sap.common.Currencies",
"keys": [
{
"ref": [
"code"
]
}
]
},
"image": {
"@Core.MediaType": "image/png",
"type": "cds.LargeBinary"
},
"reviews": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "ReviewsService.Reviews",
"on": [
{
"ref": [
"reviews",
"subject"
]
},
"=",
{
"ref": [
"$self",
"ID"
]
}
]
},
"rating": {
"type": "cds.Decimal"
},
"numberOfReviews": {
"type": "cds.Integer"
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.capire.bookshop.Books.texts",
"on": [
{
"ref": [
"texts",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Books.texts",
"on": [
{
"ref": [
"localized",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"sap.capire.bookshop.Authors": {
"kind": "entity",
"includes": [
"managed"
],
"elements": {
"createdAt": {
"@cds.on.insert": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"createdBy": {
"@cds.on.insert": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedBy": {
"@cds.on.insert": {
"=": "$user"
},
"@cds.on.update": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"name": {
"type": "cds.String",
"length": 111
},
"dateOfBirth": {
"type": "cds.Date"
},
"dateOfDeath": {
"type": "cds.Date"
},
"placeOfBirth": {
"type": "cds.String"
},
"placeOfDeath": {
"type": "cds.String"
},
"books": {
"type": "cds.Association",
"cardinality": {
"max": "*"
},
"target": "sap.capire.bookshop.Books",
"on": [
{
"ref": [
"books",
"author"
]
},
"=",
{
"ref": [
"$self"
]
}
]
}
}
},
"sap.capire.bookshop.Genres": {
"kind": "entity",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"includes": [
"sap.common.CodeList"
],
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"parent": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Genres",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"children": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.capire.bookshop.Genres",
"on": [
{
"ref": [
"children",
"parent"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.capire.bookshop.Genres.texts",
"on": [
{
"ref": [
"texts",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Genres.texts",
"on": [
{
"ref": [
"localized",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"CatalogService": {
"kind": "service",
"@path": "/browse"
},
"CatalogService.ListOfBooks": {
"kind": "entity",
"@readonly": true,
"projection": {
"from": {
"ref": [
"CatalogService.Books"
]
},
"excluding": [
"descr"
]
},
"elements": {
"createdAt": {
"@cds.on.insert": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"title": {
"localized": true,
"type": "cds.String",
"length": 111
},
"author": {
"type": "cds.String",
"length": 111
},
"genre": {
"type": "cds.Association",
"target": "CatalogService.GenreHierarchy",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"stock": {
"type": "cds.Integer"
},
"price": {
"type": "cds.Decimal"
},
"currency": {
"@title": "{i18n>Currency}",
"@description": "{i18n>CurrencyCode.Description}",
"type": "Currency",
"target": "CatalogService.Currencies",
"keys": [
{
"ref": [
"code"
]
}
]
},
"image": {
"@Core.MediaType": "image/png",
"type": "cds.LargeBinary"
},
"reviews": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "CatalogService.Reviews",
"on": [
{
"ref": [
"reviews",
"subject"
]
},
"=",
{
"ref": [
"$self",
"ID"
]
}
]
},
"rating": {
"type": "cds.Decimal"
},
"numberOfReviews": {
"type": "cds.Integer"
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "CatalogService.Books.texts",
"on": [
{
"ref": [
"texts",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "CatalogService.Books.texts",
"on": [
{
"ref": [
"localized",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"CatalogService.Books": {
"kind": "entity",
"@readonly": true,
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.Books"
]
},
"columns": [
"*",
{
"ref": [
"author",
"name"
],
"as": "author"
}
],
"excluding": [
"createdBy",
"modifiedBy"
]
},
"elements": {
"createdAt": {
"@cds.on.insert": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"title": {
"localized": true,
"type": "cds.String",
"length": 111
},
"descr": {
"localized": true,
"type": "cds.String",
"length": 1111
},
"author": {
"type": "cds.String",
"length": 111
},
"genre": {
"type": "cds.Association",
"target": "CatalogService.GenreHierarchy",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"stock": {
"type": "cds.Integer"
},
"price": {
"type": "cds.Decimal"
},
"currency": {
"@title": "{i18n>Currency}",
"@description": "{i18n>CurrencyCode.Description}",
"type": "Currency",
"target": "CatalogService.Currencies",
"keys": [
{
"ref": [
"code"
]
}
]
},
"image": {
"@Core.MediaType": "image/png",
"type": "cds.LargeBinary"
},
"reviews": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "CatalogService.Reviews",
"on": [
{
"ref": [
"reviews",
"subject"
]
},
"=",
{
"ref": [
"$self",
"ID"
]
}
]
},
"rating": {
"type": "cds.Decimal"
},
"numberOfReviews": {
"type": "cds.Integer"
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "CatalogService.Books.texts",
"on": [
{
"ref": [
"texts",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "CatalogService.Books.texts",
"on": [
{
"ref": [
"localized",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"CatalogService.submitOrder": {
"kind": "action",
"@requires": "authenticated-user",
"params": {
"book": {
"type": {
"ref": [
"CatalogService.Books",
"ID"
]
}
},
"quantity": {
"type": "cds.Integer"
}
},
"returns": {
"elements": {
"stock": {
"type": "cds.Integer"
}
}
}
},
"CatalogService.OrderedBook": {
"kind": "event",
"elements": {
"book": {
"type": {
"ref": [
"CatalogService.Books",
"ID"
]
}
},
"quantity": {
"type": "cds.Integer"
},
"buyer": {
"type": "cds.String"
}
}
},
"AdminService": {
"kind": "service",
"@requires": "admin"
},
"AdminService.Books": {
"kind": "entity",
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.Books"
]
}
},
"elements": {
"createdAt": {
"@cds.on.insert": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"createdBy": {
"@cds.on.insert": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedBy": {
"@cds.on.insert": {
"=": "$user"
},
"@cds.on.update": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"title": {
"localized": true,
"type": "cds.String",
"length": 111
},
"descr": {
"localized": true,
"type": "cds.String",
"length": 1111
},
"author": {
"type": "cds.Association",
"target": "AdminService.Authors",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"genre": {
"type": "cds.Association",
"target": "AdminService.Genres",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"stock": {
"type": "cds.Integer"
},
"price": {
"type": "cds.Decimal"
},
"currency": {
"@title": "{i18n>Currency}",
"@description": "{i18n>CurrencyCode.Description}",
"type": "Currency",
"target": "AdminService.Currencies",
"keys": [
{
"ref": [
"code"
]
}
]
},
"image": {
"@Core.MediaType": "image/png",
"type": "cds.LargeBinary"
},
"reviews": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "AdminService.Reviews",
"on": [
{
"ref": [
"reviews",
"subject"
]
},
"=",
{
"ref": [
"$self",
"ID"
]
}
]
},
"rating": {
"type": "cds.Decimal"
},
"numberOfReviews": {
"type": "cds.Integer"
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "AdminService.Books.texts",
"on": [
{
"ref": [
"texts",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "AdminService.Books.texts",
"on": [
{
"ref": [
"localized",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"AdminService.Authors": {
"kind": "entity",
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.Authors"
]
}
},
"elements": {
"createdAt": {
"@cds.on.insert": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"createdBy": {
"@cds.on.insert": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedBy": {
"@cds.on.insert": {
"=": "$user"
},
"@cds.on.update": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"name": {
"type": "cds.String",
"length": 111
},
"dateOfBirth": {
"type": "cds.Date"
},
"dateOfDeath": {
"type": "cds.Date"
},
"placeOfBirth": {
"type": "cds.String"
},
"placeOfDeath": {
"type": "cds.String"
},
"books": {
"type": "cds.Association",
"cardinality": {
"max": "*"
},
"target": "AdminService.Books",
"on": [
{
"ref": [
"books",
"author"
]
},
"=",
{
"ref": [
"$self"
]
}
]
}
}
},
"ReviewsService": {
"kind": "service",
"@restrict": [
{
"grant": "like",
"to": "identified-user"
},
{
"grant": "unlike",
"to": "identified-user",
"where": "user=$user"
}
]
},
"ReviewsService.Reviews": {
"kind": "entity",
"@restrict": [
{
"grant": "READ",
"to": "any"
},
{
"grant": "CREATE",
"to": "authenticated-user"
},
{
"grant": "UPDATE",
"to": "authenticated-user",
"where": "reviewer=$user"
},
{
"grant": "DELETE",
"to": "admin"
}
],
"projection": {
"from": {
"ref": [
"sap.capire.reviews.Reviews"
]
},
"excluding": [
"likes"
]
},
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
},
"subject": {
"@mandatory": true,
"type": "sap.capire.reviews.ReviewedSubject",
"length": 111
},
"reviewer": {
"@cds.on.insert": {
"=": "$user"
},
"@title": "{i18n>UserID}",
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"rating": {
"@assert.range": true,
"type": "sap.capire.reviews.Rating"
},
"title": {
"@mandatory": true,
"type": "cds.String",
"length": 111
},
"text": {
"type": "cds.String",
"length": 1111
},
"date": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"type": "cds.DateTime"
},
"liked": {
"type": "cds.Integer",
"default": {
"val": 0
}
}
}
},
"ReviewsService.like": {
"kind": "action",
"params": {
"review": {
"type": {
"ref": [
"ReviewsService.Reviews",
"ID"
]
}
}
}
},
"ReviewsService.unlike": {
"kind": "action",
"params": {
"review": {
"type": {
"ref": [
"ReviewsService.Reviews",
"ID"
]
}
}
}
},
"ReviewsService.reviewed": {
"kind": "event",
"elements": {
"subject": {
"@mandatory": true,
"type": {
"ref": [
"ReviewsService.Reviews",
"subject"
]
},
"length": 111
},
"count": {
"type": "cds.Integer"
},
"rating": {
"type": "cds.Decimal"
}
}
},
"OrdersService": {
"kind": "service"
},
"OrdersService.Orders": {
"kind": "entity",
"@odata.draft.enabled": true,
"@UI.SelectionFields": [
{
"=": "createdAt"
},
{
"=": "createdBy"
}
],
"@UI.LineItem": [
{
"Value": {
"=": "OrderNo"
},
"Label": "OrderNo"
},
{
"Value": {
"=": "buyer"
},
"Label": "Customer"
},
{
"Value": {
"=": "createdAt"
},
"Label": "Date"
}
],
"@UI.HeaderInfo.TypeName": "Order",
"@UI.HeaderInfo.TypeNamePlural": "Orders",
"@UI.HeaderInfo.Title.Label": "Order number ",
"@UI.HeaderInfo.Title.Value": {
"=": "OrderNo"
},
"@UI.HeaderInfo.Description.Value": {
"=": "createdBy"
},
"@UI.Identification": [
{
"Value": {
"=": "createdBy"
},
"Label": "Customer"
},
{
"Value": {
"=": "createdAt"
},
"Label": "Date"
},
{
"Value": {
"=": "OrderNo"
}
}
],
"@UI.HeaderFacets": [
{
"$Type": "UI.ReferenceFacet",
"Label": "{i18n>Created}",
"Target": "@UI.FieldGroup#Created"
},
{
"$Type": "UI.ReferenceFacet",
"Label": "{i18n>Modified}",
"Target": "@UI.FieldGroup#Modified"
}
],
"@UI.Facets": [
{
"$Type": "UI.ReferenceFacet",
"Label": "{i18n>Details}",
"Target": "@UI.FieldGroup#Details"
},
{
"$Type": "UI.ReferenceFacet",
"Label": "{i18n>OrderItems}",
"Target": "Items/@UI.LineItem"
}
],
"@UI.FieldGroup#Details.Data": [
{
"Value": {
"=": "currency.code"
},
"Label": "Currency"
}
],
"@UI.FieldGroup#Created.Data": [
{
"Value": {
"=": "createdBy"
}
},
{
"Value": {
"=": "createdAt"
}
}
],
"@UI.FieldGroup#Modified.Data": [
{
"Value": {
"=": "modifiedBy"
}
},
{
"Value": {
"=": "modifiedAt"
}
}
],
"projection": {
"from": {
"ref": [
"sap.capire.orders.Orders"
]
}
},
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
},
"createdAt": {
"@UI.HiddenFilter": false,
"@cds.on.insert": {
"=": "$now"
},
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"createdBy": {
"@UI.HiddenFilter": false,
"@cds.on.insert": {
"=": "$user"
},
"@Core.Immutable": true,
"@title": "{i18n>CreatedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedBy": {
"@cds.on.insert": {
"=": "$user"
},
"@cds.on.update": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"OrderNo": {
"@title": "Order Number",
"type": "cds.String"
},
"Items": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"targetAspect": {
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
},
"product": {
"type": "cds.Association",
"target": "sap.capire.orders.Products",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"quantity": {
"type": "cds.Integer"
},
"title": {
"type": "cds.String"
},
"price": {
"type": "cds.Double"
},
"book": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Books",
"on": [
{
"ref": [
"product",
"ID"
]
},
"=",
{
"ref": [
"book",
"ID"
]
}
]
}
}
},
"target": "OrdersService.Orders.Items",
"on": [
{
"ref": [
"Items",
"up_"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"buyer": {
"@title": "{i18n>UserID}",
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"currency": {
"@title": "{i18n>Currency}",
"@description": "{i18n>CurrencyCode.Description}",
"type": "Currency",
"target": "OrdersService.Currencies",
"keys": [
{
"ref": [
"code"
]
}
]
}
}
},
"sap.capire.orders.Orders": {
"kind": "entity",
"includes": [
"cuid",
"managed"
],
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
},
"createdAt": {
"@cds.on.insert": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"createdBy": {
"@cds.on.insert": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedBy": {
"@cds.on.insert": {
"=": "$user"
},
"@cds.on.update": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"OrderNo": {
"@title": "Order Number",
"type": "cds.String"
},
"Items": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"targetAspect": {
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
},
"product": {
"type": "cds.Association",
"target": "sap.capire.orders.Products",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"quantity": {
"type": "cds.Integer"
},
"title": {
"type": "cds.String"
},
"price": {
"type": "cds.Double"
},
"book": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Books",
"on": [
{
"ref": [
"product",
"ID"
]
},
"=",
{
"ref": [
"book",
"ID"
]
}
]
}
}
},
"target": "sap.capire.orders.Orders.Items",
"on": [
{
"ref": [
"Items",
"up_"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"buyer": {
"@title": "{i18n>UserID}",
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"currency": {
"@title": "{i18n>Currency}",
"@description": "{i18n>CurrencyCode.Description}",
"type": "Currency",
"target": "sap.common.Currencies",
"keys": [
{
"ref": [
"code"
]
}
]
}
}
},
"sap.capire.orders.Products": {
"kind": "entity",
"@cds.persistence.skip": "always",
"elements": {
"ID": {
"key": true,
"type": "cds.String"
}
}
},
"DataService": {
"kind": "service",
"@requires": "authenticated-user",
"@path": "-data"
},
"DataService.Entities": {
"kind": "entity",
"elements": {
"name": {
"key": true,
"type": "cds.String"
},
"columns": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"targetAspect": {
"elements": {
"name": {
"type": "cds.String"
},
"type": {
"type": "cds.String"
},
"isKey": {
"type": "cds.Boolean"
}
}
},
"target": "DataService.Entities.columns",
"on": [
{
"ref": [
"columns",
"up_"
]
},
"=",
{
"ref": [
"$self"
]
}
]
}
}
},
"DataService.Data": {
"kind": "entity",
"elements": {
"record": {
"items": {
"elements": {
"column": {
"type": "cds.String"
},
"data": {
"type": "cds.String"
}
}
}
}
}
},
"Language": {
"kind": "type",
"@title": "{i18n>Language}",
"@description": "{i18n>LanguageCode.Description}",
"type": "cds.Association",
"target": "sap.common.Languages",
"keys": [
{
"ref": [
"code"
]
}
]
},
"Currency": {
"kind": "type",
"@title": "{i18n>Currency}",
"@description": "{i18n>CurrencyCode.Description}",
"type": "cds.Association",
"target": "sap.common.Currencies",
"keys": [
{
"ref": [
"code"
]
}
]
},
"Country": {
"kind": "type",
"@title": "{i18n>Country}",
"@description": "{i18n>CountryCode.Description}",
"type": "cds.Association",
"target": "sap.common.Countries",
"keys": [
{
"ref": [
"code"
]
}
]
},
"sap.common": {
"kind": "context"
},
"sap.common.Locale": {
"kind": "type",
"@title": "{i18n>LanguageCode}",
"type": "cds.String",
"length": 14
},
"sap.common.Languages": {
"kind": "entity",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"includes": [
"sap.common.CodeList"
],
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"@Common.Text": {
"=": "name"
},
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.Languages.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.common.Languages.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"sap.common.Countries": {
"kind": "entity",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"includes": [
"sap.common.CodeList"
],
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"@title": "{i18n>CountryCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
},
"regions": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.countries.Regions",
"on": [
{
"ref": [
"regions",
"_parent"
]
},
"=",
{
"ref": [
"$self",
"code"
]
}
]
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.Countries.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.common.Countries.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"sap.common.Currencies": {
"kind": "entity",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"includes": [
"sap.common.CodeList"
],
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"@title": "{i18n>CurrencyCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
},
"symbol": {
"@title": "{i18n>CurrencySymbol}",
"type": "cds.String",
"length": 5
},
"numcode": {
"type": "cds.Integer"
},
"exponent": {
"type": "cds.Integer"
},
"minor": {
"type": "cds.String"
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.common.Currencies.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "sap.common.Currencies.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"sap.common.CodeList": {
"kind": "aspect",
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
}
}
},
"cuid": {
"kind": "aspect",
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
}
}
},
"managed": {
"kind": "aspect",
"elements": {
"createdAt": {
"@cds.on.insert": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"createdBy": {
"@cds.on.insert": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@Core.Immutable": true,
"@title": "{i18n>CreatedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"modifiedAt": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedAt}",
"@readonly": true,
"type": "cds.Timestamp"
},
"modifiedBy": {
"@cds.on.insert": {
"=": "$user"
},
"@cds.on.update": {
"=": "$user"
},
"@UI.HiddenFilter": true,
"@title": "{i18n>ChangedBy}",
"@readonly": true,
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
}
}
},
"temporal": {
"kind": "aspect",
"elements": {
"validFrom": {
"@cds.valid.from": true,
"type": "cds.Timestamp"
},
"validTo": {
"@cds.valid.to": true,
"type": "cds.Timestamp"
}
}
},
"User": {
"kind": "type",
"@title": "{i18n>UserID}",
"@description": "{i18n>UserID.Description}",
"type": "cds.String",
"length": 255
},
"extensible": {
"kind": "aspect",
"elements": {
"extensions__": {
"@cds.api.ignore": true,
"type": "cds.String"
}
}
},
"sap.capire.reviews.ReviewedSubject": {
"kind": "type",
"type": "cds.String",
"length": 111
},
"sap.capire.reviews.Reviews": {
"kind": "entity",
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
},
"subject": {
"type": "sap.capire.reviews.ReviewedSubject",
"length": 111
},
"reviewer": {
"@cds.on.insert": {
"=": "$user"
},
"@title": "{i18n>UserID}",
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"rating": {
"type": "sap.capire.reviews.Rating"
},
"title": {
"type": "cds.String",
"length": 111
},
"text": {
"type": "cds.String",
"length": 1111
},
"date": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"type": "cds.DateTime"
},
"likes": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "sap.capire.reviews.Likes",
"on": [
{
"ref": [
"likes",
"review"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"liked": {
"type": "cds.Integer",
"default": {
"val": 0
}
}
}
},
"sap.capire.reviews.Rating": {
"kind": "type",
"type": "cds.Integer",
"enum": {
"Best": {
"val": 5
},
"Good": {
"val": 4
},
"Avg": {
"val": 3
},
"Poor": {
"val": 2
},
"Worst": {
"val": 1
}
}
},
"sap.capire.reviews.Likes": {
"kind": "entity",
"elements": {
"review": {
"key": true,
"type": "cds.Association",
"target": "sap.capire.reviews.Reviews",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"user": {
"@title": "{i18n>UserID}",
"@description": "{i18n>UserID.Description}",
"key": true,
"type": "User",
"length": 255
}
}
},
"sap.capire.bookshop.GenreHierarchy.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"ID": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.Integer"
}
}
},
"sap.common.countries.Regions.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.String",
"length": 5
}
}
},
"sap.common.countries.Cities.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.String",
"length": 11
}
}
},
"sap.common.countries.Districts.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.String",
"length": 11
}
}
},
"sap.capire.bookshop.Books.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"ID": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.Integer"
},
"title": {
"localized": null,
"type": "cds.String",
"length": 111
},
"descr": {
"localized": null,
"type": "cds.String",
"length": 1111
}
}
},
"sap.capire.bookshop.Genres.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"ID": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.Integer"
}
}
},
"sap.capire.orders.Orders.Items": {
"kind": "entity",
"elements": {
"up_": {
"key": true,
"type": "cds.Association",
"cardinality": {
"min": 1,
"max": 1
},
"target": "sap.capire.orders.Orders",
"keys": [
{
"ref": [
"ID"
]
}
],
"notNull": true
},
"ID": {
"key": true,
"type": "cds.UUID"
},
"product": {
"type": "cds.Association",
"target": "sap.capire.orders.Products",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"quantity": {
"type": "cds.Integer"
},
"title": {
"type": "cds.String"
},
"price": {
"type": "cds.Double"
},
"book": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Books",
"on": [
{
"ref": [
"product",
"ID"
]
},
"=",
{
"ref": [
"book",
"ID"
]
}
]
}
}
},
"DataService.Entities.columns": {
"kind": "entity",
"elements": {
"up_": {
"key": true,
"type": "cds.Association",
"cardinality": {
"min": 1,
"max": 1
},
"target": "DataService.Entities",
"keys": [
{
"ref": [
"name"
]
}
],
"notNull": true
},
"name": {
"type": "cds.String"
},
"type": {
"type": "cds.String"
},
"isKey": {
"type": "cds.Boolean"
}
}
},
"sap.common.Languages.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"@Common.Text": {
"=": "name"
},
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
}
}
},
"sap.common.Countries.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"@title": "{i18n>CountryCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
}
}
},
"sap.common.Currencies.texts": {
"kind": "entity",
"@odata.draft.enabled": false,
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"@title": "{i18n>CurrencyCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
}
}
},
"CatalogService.GenreHierarchy.texts": {
"kind": "entity",
"@cds.autoexposed": true,
"@odata.draft.enabled": false,
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.GenreHierarchy.texts"
]
}
},
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"ID": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.Integer"
}
}
},
"CatalogService.Currencies": {
"kind": "entity",
"@cds.autoexposed": true,
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"projection": {
"from": {
"ref": [
"sap.common.Currencies"
]
}
},
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"@title": "{i18n>CurrencyCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
},
"symbol": {
"@title": "{i18n>CurrencySymbol}",
"type": "cds.String",
"length": 5
},
"numcode": {
"type": "cds.Integer"
},
"exponent": {
"type": "cds.Integer"
},
"minor": {
"type": "cds.String"
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "CatalogService.Currencies.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "CatalogService.Currencies.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"CatalogService.Reviews": {
"kind": "entity",
"@cds.autoexposed": true,
"@restrict": [
{
"grant": "READ",
"to": "any"
},
{
"grant": "CREATE",
"to": "authenticated-user"
},
{
"grant": "UPDATE",
"to": "authenticated-user",
"where": "reviewer=$user"
},
{
"grant": "DELETE",
"to": "admin"
}
],
"projection": {
"from": {
"ref": [
"ReviewsService.Reviews"
]
}
},
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
},
"subject": {
"@mandatory": true,
"type": "sap.capire.reviews.ReviewedSubject",
"length": 111
},
"reviewer": {
"@cds.on.insert": {
"=": "$user"
},
"@title": "{i18n>UserID}",
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"rating": {
"@assert.range": true,
"type": "sap.capire.reviews.Rating"
},
"title": {
"@mandatory": true,
"type": "cds.String",
"length": 111
},
"text": {
"type": "cds.String",
"length": 1111
},
"date": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"type": "cds.DateTime"
},
"liked": {
"type": "cds.Integer",
"default": {
"val": 0
}
}
}
},
"CatalogService.Books.texts": {
"kind": "entity",
"@cds.autoexposed": true,
"@odata.draft.enabled": false,
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.Books.texts"
]
}
},
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"ID": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.Integer"
},
"title": {
"localized": null,
"type": "cds.String",
"length": 111
},
"descr": {
"localized": null,
"type": "cds.String",
"length": 1111
}
}
},
"AdminService.Genres": {
"kind": "entity",
"@cds.autoexposed": true,
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.Genres"
]
}
},
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"ID": {
"key": true,
"type": "cds.Integer"
},
"parent": {
"type": "cds.Association",
"target": "AdminService.Genres",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"children": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "AdminService.Genres",
"on": [
{
"ref": [
"children",
"parent"
]
},
"=",
{
"ref": [
"$self"
]
}
]
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "AdminService.Genres.texts",
"on": [
{
"ref": [
"texts",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "AdminService.Genres.texts",
"on": [
{
"ref": [
"localized",
"ID"
]
},
"=",
{
"ref": [
"ID"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"AdminService.Currencies": {
"kind": "entity",
"@cds.autoexposed": true,
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"projection": {
"from": {
"ref": [
"sap.common.Currencies"
]
}
},
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"@title": "{i18n>CurrencyCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
},
"symbol": {
"@title": "{i18n>CurrencySymbol}",
"type": "cds.String",
"length": 5
},
"numcode": {
"type": "cds.Integer"
},
"exponent": {
"type": "cds.Integer"
},
"minor": {
"type": "cds.String"
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "AdminService.Currencies.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "AdminService.Currencies.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"AdminService.Reviews": {
"kind": "entity",
"@cds.autoexposed": true,
"@restrict": [
{
"grant": "READ",
"to": "any"
},
{
"grant": "CREATE",
"to": "authenticated-user"
},
{
"grant": "UPDATE",
"to": "authenticated-user",
"where": "reviewer=$user"
},
{
"grant": "DELETE",
"to": "admin"
}
],
"projection": {
"from": {
"ref": [
"ReviewsService.Reviews"
]
}
},
"elements": {
"ID": {
"key": true,
"type": "cds.UUID"
},
"subject": {
"@mandatory": true,
"type": "sap.capire.reviews.ReviewedSubject",
"length": 111
},
"reviewer": {
"@cds.on.insert": {
"=": "$user"
},
"@title": "{i18n>UserID}",
"@description": "{i18n>UserID.Description}",
"type": "User",
"length": 255
},
"rating": {
"@assert.range": true,
"type": "sap.capire.reviews.Rating"
},
"title": {
"@mandatory": true,
"type": "cds.String",
"length": 111
},
"text": {
"type": "cds.String",
"length": 1111
},
"date": {
"@cds.on.insert": {
"=": "$now"
},
"@cds.on.update": {
"=": "$now"
},
"type": "cds.DateTime"
},
"liked": {
"type": "cds.Integer",
"default": {
"val": 0
}
}
}
},
"AdminService.Books.texts": {
"kind": "entity",
"@cds.autoexposed": true,
"@odata.draft.enabled": false,
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.Books.texts"
]
}
},
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"ID": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.Integer"
},
"title": {
"localized": null,
"type": "cds.String",
"length": 111
},
"descr": {
"localized": null,
"type": "cds.String",
"length": 1111
}
}
},
"OrdersService.Orders.Items": {
"kind": "entity",
"@cds.autoexposed": true,
"@UI.LineItem": [
{
"Value": {
"=": "product_ID"
},
"Label": "Product ID"
},
{
"Value": {
"=": "title"
},
"Label": "Product Title"
},
{
"Value": {
"=": "price"
},
"Label": "Unit Price"
},
{
"Value": {
"=": "quantity"
},
"Label": "Quantity"
}
],
"@UI.Identification": [
{
"Value": {
"=": "quantity"
},
"Label": "Quantity"
},
{
"Value": {
"=": "title"
},
"Label": "Product"
},
{
"Value": {
"=": "price"
},
"Label": "Unit Price"
}
],
"@UI.Facets": [
{
"$Type": "UI.ReferenceFacet",
"Label": "{i18n>OrderItems}",
"Target": "@UI.Identification"
}
],
"projection": {
"from": {
"ref": [
"sap.capire.orders.Orders.Items"
]
}
},
"elements": {
"up_": {
"key": true,
"type": "cds.Association",
"cardinality": {
"min": 1,
"max": 1
},
"target": "OrdersService.Orders",
"keys": [
{
"ref": [
"ID"
]
}
],
"notNull": true
},
"ID": {
"key": true,
"type": "cds.UUID"
},
"product": {
"type": "cds.Association",
"target": "sap.capire.orders.Products",
"keys": [
{
"ref": [
"ID"
]
}
]
},
"quantity": {
"@Common.FieldControl": {
"#": "Mandatory"
},
"type": "cds.Integer"
},
"title": {
"type": "cds.String"
},
"price": {
"type": "cds.Double"
},
"book": {
"type": "cds.Association",
"target": "sap.capire.bookshop.Books",
"on": [
{
"ref": [
"product",
"ID"
]
},
"=",
{
"ref": [
"book",
"ID"
]
}
]
}
}
},
"OrdersService.Currencies": {
"kind": "entity",
"@cds.autoexposed": true,
"@cds.autoexpose": true,
"@cds.persistence.skip": "if-unused",
"@UI.Identification": [
{
"Value": {
"=": "name"
}
}
],
"@cds.odata.valuelist": true,
"projection": {
"from": {
"ref": [
"sap.common.Currencies"
]
}
},
"elements": {
"name": {
"@title": "{i18n>Name}",
"localized": true,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": true,
"type": "cds.String",
"length": 1000
},
"code": {
"@title": "{i18n>CurrencyCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
},
"symbol": {
"@title": "{i18n>CurrencySymbol}",
"type": "cds.String",
"length": 5
},
"numcode": {
"type": "cds.Integer"
},
"exponent": {
"type": "cds.Integer"
},
"minor": {
"type": "cds.String"
},
"texts": {
"type": "cds.Composition",
"cardinality": {
"max": "*"
},
"target": "OrdersService.Currencies.texts",
"on": [
{
"ref": [
"texts",
"code"
]
},
"=",
{
"ref": [
"code"
]
}
]
},
"localized": {
"type": "cds.Association",
"target": "OrdersService.Currencies.texts",
"on": [
{
"ref": [
"localized",
"code"
]
},
"=",
{
"ref": [
"code"
]
},
"and",
{
"ref": [
"localized",
"locale"
]
},
"=",
{
"ref": [
"$user",
"locale"
]
}
]
}
}
},
"CatalogService.Currencies.texts": {
"kind": "entity",
"@cds.autoexposed": true,
"@odata.draft.enabled": false,
"projection": {
"from": {
"ref": [
"sap.common.Currencies.texts"
]
}
},
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"@title": "{i18n>CurrencyCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
}
}
},
"AdminService.Genres.texts": {
"kind": "entity",
"@cds.autoexposed": true,
"@odata.draft.enabled": false,
"projection": {
"from": {
"ref": [
"sap.capire.bookshop.Genres.texts"
]
}
},
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"ID": {
"@odata.containment.ignore": true,
"key": true,
"type": "cds.Integer"
}
}
},
"AdminService.Currencies.texts": {
"kind": "entity",
"@cds.autoexposed": true,
"@odata.draft.enabled": false,
"projection": {
"from": {
"ref": [
"sap.common.Currencies.texts"
]
}
},
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"@title": "{i18n>CurrencyCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
}
}
},
"OrdersService.Currencies.texts": {
"kind": "entity",
"@cds.autoexposed": true,
"@odata.draft.enabled": false,
"projection": {
"from": {
"ref": [
"sap.common.Currencies.texts"
]
}
},
"elements": {
"locale": {
"@title": "{i18n>LanguageCode}",
"key": true,
"type": "sap.common.Locale",
"length": 14
},
"name": {
"@title": "{i18n>Name}",
"localized": null,
"type": "cds.String",
"length": 255
},
"descr": {
"@title": "{i18n>Description}",
"localized": null,
"type": "cds.String",
"length": 1000
},
"code": {
"@odata.containment.ignore": true,
"@title": "{i18n>CurrencyCode}",
"@Common.Text": {
"=": "name"
},
"key": true,
"type": "cds.String",
"length": 3
}
}
}
},
"meta": {
"creator": "CDS Compiler v3.0.3",
"flavor": "inferred"
},
"$version": "2.0"
}