mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 00:38:11 +00:00
18 lines
532 B
TypeScript
18 lines
532 B
TypeScript
import { ArrayUnique, IsArray, IsOptional, Matches } from 'class-validator';
|
|
|
|
/**
|
|
* Confirm a Goods Received Note. Omit `containerNumbers` to GRN every
|
|
* received-but-un-GRN'd container on the booking (per-booking when that's all of
|
|
* them); pass a subset to GRN just those.
|
|
*/
|
|
export class GenerateGrnDto {
|
|
@IsOptional()
|
|
@IsArray()
|
|
@ArrayUnique()
|
|
@Matches(/^[A-Z]{4}\d{7}$/, {
|
|
each: true,
|
|
message: 'each container number must match ISO container format, e.g. ABCD1234567',
|
|
})
|
|
containerNumbers?: string[];
|
|
}
|