cosmetics

This commit is contained in:
Daniel Hutzel
2023-07-17 14:22:00 +02:00
parent 1d14e75691
commit 06c583d0cd
15 changed files with 363 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
// This is an automatically generated file. Please do not change its contents manually!
const cds = require('@sap/cds')
const csn = cds.entities('CatalogService')
module.exports.ListOfBook = csn.ListOfBooks
module.exports.ListOfBooks = csn.ListOfBooks
module.exports.Book = csn.Books
module.exports.Books = csn.Books
// actions
module.exports.submitOrder = 'submitOrder'
// enums

View File

@@ -0,0 +1,56 @@
// This is an automatically generated file. Please do not change its contents manually!
import * as _sap_capire_bookshop from './../sap/capire/bookshop';
import * as __ from './../_';
import * as _ from './..';
/**
* For displaying lists of Books
*/
export function _ListOfBookAspect<TBase extends new (...args: any[]) => any>(Base: TBase) {
return class ListOfBook extends Base {
ID ?: number;
title ?: string;
descr ?: string;
author ?: __.Association.to<_sap_capire_bookshop.Author>;
genre ?: __.Association.to<_sap_capire_bookshop.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 ListOfBook extends _._managedAspect(_ListOfBookAspect(__.Entity)) {}
export class ListOfBooks extends Array<ListOfBook> {}
/**
* For display in details pages
*/
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<_sap_capire_bookshop.Author>;
genre ?: __.Association.to<_sap_capire_bookshop.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> {}
// function
export declare const submitOrder: (book: __.DeepRequired<Book>['ID'], quantity: number) => {
stock ?: number;
};