add createFile group for document

This commit is contained in:
OxSaitama 2023-08-17 13:37:48 +02:00
parent ad0660abcb
commit 034c5f4d33
2 changed files with 3 additions and 1 deletions

View File

@ -30,6 +30,7 @@ class Document extends Resource_1.default {
}
__decorate([
(0, class_transformer_1.Expose)(),
(0, class_validator_1.IsNotEmpty)({ groups: ["createFile"], message: "UID is required" }),
__metadata("design:type", String)
], Document.prototype, "uid", void 0);
__decorate([

View File

@ -1,5 +1,5 @@
import {
IsDate,
IsDate, IsNotEmpty,
} from "class-validator";
import Customer from ".";
import DocumentHistory from "./DocumentHistory";
@ -11,6 +11,7 @@ import { Expose, Type } from "class-transformer";
export default class Document extends Resource {
@Expose()
@IsNotEmpty({ groups: ["createFile"], message: "UID is required" })
public uid?: string;
@Expose()