feat(backend): Abfuellungen und Produkte (Modul 23)
ProductsModule (GET/POST /products, GET/PATCH /products/:id) und BottlingModule (GET/POST /bottling-batches) mit transaktionaler Reduzierung der HoneyBatch-Restmenge beim Abfuellen; Ablehnung bei Abfuellmenge > verfuegbarer Menge. Neue Prisma-Modelle Product und BottlingBatch (Migration bottling_products).
This commit is contained in:
1 parent
8b7fd61c1c
commit
e82cae257b
17 files changed
+916
-2
No files matched your search
@@ -0,0 +1,42 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import {
|
||||
IsDateString,
|
||||
IsInt,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsPositive,
|
||||
IsString,
|
||||
} from 'class-validator';
|
||||
|
||||
export class CreateBottlingBatchDto {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
honeyBatchId!: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
productId?: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsDateString()
|
||||
date!: string;
|
||||
|
||||
@ApiProperty({ description: 'Glasgröße in Gramm' })
|
||||
@IsNumber()
|
||||
@IsPositive()
|
||||
jarSize!: number;
|
||||
|
||||
@ApiProperty()
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
jarCount!: number;
|
||||
|
||||
@ApiProperty()
|
||||
@IsDateString()
|
||||
bestBeforeDate!: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
lotNumber!: string;
|
||||
}
|
||||
Reference in new issue
Block a user