- RawMaterialLot (beeswax, propolis) in grams with origin (apiary, harvest); stock in the same movement ledger: withdrawals, inventory counts, and the new movement type CONSUMPTION. - Production batches take inputs (raw lot + grams); batch and consumption are one transaction, never more than a lot has left. Deleting a mistaken batch gives the material back as its own movement. - Traceability both ways: batch -> inputs, raw lot -> usedIn. - Movement belongs to exactly one of bottling / production / raw lot (CHECK); raw material changes do not trigger the shop webhook. - Permissions raw-material:*, granted to roles that maintain production batches. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
12 lines
378 B
TypeScript
12 lines
378 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { StockModule } from '../stock/stock.module';
|
|
import { RawMaterialsController } from './raw-materials.controller';
|
|
import { RawMaterialsService } from './raw-materials.service';
|
|
|
|
@Module({
|
|
imports: [StockModule],
|
|
controllers: [RawMaterialsController],
|
|
providers: [RawMaterialsService],
|
|
})
|
|
export class RawMaterialsModule {}
|