import { Service } from 'typedi' ; import { OrmRepository } from 'typeorm-typedi-extensions' ; import { Logger , LoggerInterface } from '../../decorators/Logger' ; import { OrderTotal } from '../models/OrderTotal' ; import { OrderTotalRepository } from '../repositories/OrderTotalRepository' ; @ Service ( ) export class OrderTotalService { constructor ( @ OrmRepository ( ) private orderTotalRepository , @ Logger ( __filename ) private log ) { } public async createOrderTotalData ( orderTotalData ) { this . log . info ( 'create a order total data' ) ; return this . orderTotalRepository . save ( orderTotalData ) ; } }