cosmetics
This commit is contained in:
11
bookshop/@cds-models/sap/capire/bookshop/index.js
Normal file
11
bookshop/@cds-models/sap/capire/bookshop/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
// This is an automatically generated file. Please do not change its contents manually!
|
||||
const cds = require('@sap/cds')
|
||||
const csn = cds.entities('sap.capire.bookshop')
|
||||
module.exports.Book = csn.Books
|
||||
module.exports.Books = csn.Books
|
||||
module.exports.Author = csn.Authors
|
||||
module.exports.Authors = csn.Authors
|
||||
module.exports.Genre = csn.Genres
|
||||
module.exports.Genres = csn.Genres
|
||||
// actions
|
||||
// enums
|
||||
51
bookshop/@cds-models/sap/capire/bookshop/index.ts
Normal file
51
bookshop/@cds-models/sap/capire/bookshop/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
// This is an automatically generated file. Please do not change its contents manually!
|
||||
import * as __ from './../../../_';
|
||||
import * as _ from './../../..';
|
||||
import * as _sap_common from './../../common';
|
||||
export function _BookAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
|
||||
return class Book extends Base {
|
||||
ID ?: number;
|
||||
title ?: string;
|
||||
descr ?: string;
|
||||
author ?: __.Association.to<Author>;
|
||||
genre ?: __.Association.to<Genre>;
|
||||
stock ?: number;
|
||||
price ?: number;
|
||||
/**
|
||||
* Type for an association to Currencies
|
||||
*
|
||||
* See https://cap.cloud.sap/docs/cds/common#type-currency
|
||||
*/
|
||||
currency ?: _.Currency;
|
||||
image ?: string;
|
||||
};
|
||||
}
|
||||
export class Book extends _._managedAspect(_BookAspect(__.Entity)) {}
|
||||
export class Books extends Array<Book> {}
|
||||
|
||||
export function _AuthorAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
|
||||
return class Author extends Base {
|
||||
ID ?: number;
|
||||
name ?: string;
|
||||
dateOfBirth ?: Date;
|
||||
dateOfDeath ?: Date;
|
||||
placeOfBirth ?: string;
|
||||
placeOfDeath ?: string;
|
||||
books ?: __.Association.to.many<Books>;
|
||||
};
|
||||
}
|
||||
export class Author extends _._managedAspect(_AuthorAspect(__.Entity)) {}
|
||||
export class Authors extends Array<Author> {}
|
||||
|
||||
/**
|
||||
* Hierarchically organized Code List for Genres
|
||||
*/
|
||||
export function _GenreAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
|
||||
return class Genre extends Base {
|
||||
ID ?: number;
|
||||
parent ?: __.Association.to<this>;
|
||||
children ?: __.Composition.of.many<Genres>;
|
||||
};
|
||||
}
|
||||
export class Genre extends _sap_common._CodeListAspect(_GenreAspect(__.Entity)) {}
|
||||
export class Genres extends Array<Genre> {}
|
||||
11
bookshop/@cds-models/sap/common/index.js
Normal file
11
bookshop/@cds-models/sap/common/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
// This is an automatically generated file. Please do not change its contents manually!
|
||||
const cds = require('@sap/cds')
|
||||
const csn = cds.entities('sap.common')
|
||||
module.exports.Language = csn.Languages
|
||||
module.exports.Languages = csn.Languages
|
||||
module.exports.Country = csn.Countries
|
||||
module.exports.Countries = csn.Countries
|
||||
module.exports.Currency = csn.Currencies
|
||||
module.exports.Currencies = csn.Currencies
|
||||
// actions
|
||||
// enums
|
||||
64
bookshop/@cds-models/sap/common/index.ts
Normal file
64
bookshop/@cds-models/sap/common/index.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
// This is an automatically generated file. Please do not change its contents manually!
|
||||
import * as __ from './../../_';
|
||||
export type Locale = string;
|
||||
// the following represents the CDS aspect 'CodeList'
|
||||
export function _CodeListAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
|
||||
return class CodeList extends Base {
|
||||
name ?: string;
|
||||
descr ?: string;
|
||||
};
|
||||
}
|
||||
export class CodeList extends _CodeListAspect(__.Entity) {}
|
||||
// the following represents the CDS aspect 'TextsAspect'
|
||||
export function _TextsAspectAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
|
||||
return class TextsAspect extends Base {
|
||||
/**
|
||||
* Type for a language code
|
||||
*/
|
||||
locale ?: Locale;
|
||||
};
|
||||
}
|
||||
export class TextsAspect extends _TextsAspectAspect(__.Entity) {}
|
||||
/**
|
||||
* Code list for languages
|
||||
*
|
||||
* See https://cap.cloud.sap/docs/cds/common#entity-sapcommonlanguages
|
||||
*/
|
||||
export function _LanguageAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
|
||||
return class Language extends Base {
|
||||
/**
|
||||
* Type for a language code
|
||||
*/
|
||||
code ?: Locale;
|
||||
};
|
||||
}
|
||||
export class Language extends _CodeListAspect(_LanguageAspect(__.Entity)) {}
|
||||
export class Languages extends Array<Language> {}
|
||||
|
||||
/**
|
||||
* Code list for countries
|
||||
*
|
||||
* See https://cap.cloud.sap/docs/cds/common#entity-sapcommoncountries
|
||||
*/
|
||||
export function _CountryAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
|
||||
return class Country extends Base {
|
||||
code ?: string;
|
||||
};
|
||||
}
|
||||
export class Country extends _CodeListAspect(_CountryAspect(__.Entity)) {}
|
||||
export class Countries extends Array<Country> {}
|
||||
|
||||
/**
|
||||
* Code list for currencies
|
||||
*
|
||||
* See https://cap.cloud.sap/docs/cds/common#entity-sapcommoncurrencies
|
||||
*/
|
||||
export function _CurrencyAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
|
||||
return class Currency extends Base {
|
||||
code ?: string;
|
||||
symbol ?: string;
|
||||
minorUnit ?: number;
|
||||
};
|
||||
}
|
||||
export class Currency extends _CodeListAspect(_CurrencyAspect(__.Entity)) {}
|
||||
export class Currencies extends Array<Currency> {}
|
||||
Reference in New Issue
Block a user