easywork-common-lib 1.0.211 → 1.0.212

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +0,0 @@
1
- import { BaseEntityWithUser } from "../../common/database";
2
- import { EntityFile } from "../helpers/entity_file.entity";
3
- export declare class AttachedObject extends BaseEntityWithUser {
4
- name: string;
5
- url: string;
6
- size: number;
7
- mimeType: string;
8
- s3Key: string;
9
- isDefault: boolean;
10
- module: string;
11
- entityType: string;
12
- entityId: string;
13
- owners?: EntityFile[];
14
- }
@@ -1,90 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AttachedObject = void 0;
13
- const database_1 = require("../../common/database");
14
- const class_validator_1 = require("class-validator");
15
- const typeorm_1 = require("typeorm");
16
- const entity_file_entity_1 = require("../helpers/entity_file.entity");
17
- const swagger_1 = require("@nestjs/swagger");
18
- let AttachedObject = class AttachedObject extends database_1.BaseEntityWithUser {
19
- name;
20
- url;
21
- size;
22
- mimeType;
23
- s3Key;
24
- isDefault;
25
- module;
26
- entityType;
27
- entityId;
28
- owners;
29
- };
30
- exports.AttachedObject = AttachedObject;
31
- __decorate([
32
- (0, swagger_1.ApiProperty)({ type: String, description: 'File name', minLength: 1 }),
33
- (0, class_validator_1.MinLength)(1),
34
- (0, typeorm_1.Column)(),
35
- __metadata("design:type", String)
36
- ], AttachedObject.prototype, "name", void 0);
37
- __decorate([
38
- (0, swagger_1.ApiProperty)({ type: String, description: 'URL of the file', required: false }),
39
- (0, typeorm_1.Column)({ nullable: true }),
40
- __metadata("design:type", String)
41
- ], AttachedObject.prototype, "url", void 0);
42
- __decorate([
43
- (0, swagger_1.ApiProperty)({ type: 'bigint', description: 'Size of the file in bytes', required: false }),
44
- (0, typeorm_1.Column)({ nullable: true, type: "bigint" }),
45
- __metadata("design:type", Number)
46
- ], AttachedObject.prototype, "size", void 0);
47
- __decorate([
48
- (0, swagger_1.ApiProperty)({ type: String, description: 'MIME type of the file', required: false }),
49
- (0, typeorm_1.Column)({ nullable: true }),
50
- __metadata("design:type", String)
51
- ], AttachedObject.prototype, "mimeType", void 0);
52
- __decorate([
53
- (0, swagger_1.ApiProperty)({ type: String, description: 'S3 key of the file', required: false }),
54
- (0, typeorm_1.Column)({ nullable: true }),
55
- __metadata("design:type", String)
56
- ], AttachedObject.prototype, "s3Key", void 0);
57
- __decorate([
58
- (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this the default file?', default: false }),
59
- (0, typeorm_1.Column)({ default: false }),
60
- __metadata("design:type", Boolean)
61
- ], AttachedObject.prototype, "isDefault", void 0);
62
- __decorate([
63
- (0, swagger_1.ApiProperty)({ type: String, description: 'the module containing the entity', required: false }),
64
- (0, typeorm_1.Column)({ nullable: true }),
65
- __metadata("design:type", String)
66
- ], AttachedObject.prototype, "module", void 0);
67
- __decorate([
68
- (0, swagger_1.ApiProperty)({ type: String, description: 'entity type', required: false }),
69
- (0, typeorm_1.Column)({ nullable: true }),
70
- __metadata("design:type", String)
71
- ], AttachedObject.prototype, "entityType", void 0);
72
- __decorate([
73
- (0, swagger_1.ApiProperty)({ type: String, description: 'entity identifier with attachment', required: false }),
74
- (0, typeorm_1.Column)({ nullable: true }),
75
- __metadata("design:type", String)
76
- ], AttachedObject.prototype, "entityId", void 0);
77
- __decorate([
78
- (0, swagger_1.ApiProperty)({ type: () => [entity_file_entity_1.EntityFile], description: 'Entities that own the file' }),
79
- (0, typeorm_1.OneToMany)(() => entity_file_entity_1.EntityFile, (entityFile) => entityFile.file, {
80
- onDelete: "CASCADE",
81
- onUpdate: "CASCADE",
82
- eager: true,
83
- }),
84
- __metadata("design:type", Array)
85
- ], AttachedObject.prototype, "owners", void 0);
86
- exports.AttachedObject = AttachedObject = __decorate([
87
- (0, typeorm_1.Entity)(),
88
- (0, typeorm_1.Index)(["name", "module", "entityType", "entityId"], { unique: true })
89
- ], AttachedObject);
90
- //# sourceMappingURL=attached_object.entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attached_object.entity.js","sourceRoot":"","sources":["../../../src/entities/drive/attached_object.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2D;AAC3D,qDAA4C;AAC5C,qCAA2D;AAC3D,sEAA2D;AAC3D,6CAA8C;AAIvC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,6BAAkB;IAIpD,IAAI,CAAS;IAIb,GAAG,CAAS;IAIZ,IAAI,CAAS;IAIb,QAAQ,CAAS;IAIjB,KAAK,CAAS;IAId,SAAS,CAAU;IAInB,MAAM,CAAS;IAIf,UAAU,CAAS;IAInB,QAAQ,CAAS;IAQjB,MAAM,CAAgB;CACvB,CAAA;AA7CY,wCAAc;AAIzB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACrE,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,GAAE;;4CACI;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC9E,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,C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