@scefira/dfw 0.0.57 → 0.1.0
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.
- package/lib/DFWInstance.d.ts +21 -0
- package/lib/DFWInstance.d.ts.map +1 -0
- package/lib/DFWInstance.js +52 -0
- package/lib/DFWInstance.js.map +1 -0
- package/lib/{script/DFWUtils.d.ts → DFWUtils.d.ts} +3 -4
- package/lib/DFWUtils.d.ts.map +1 -0
- package/lib/{script/DFWUtils.js → DFWUtils.js} +9 -15
- package/lib/DFWUtils.js.map +1 -0
- package/lib/index.d.ts +7 -58
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +14 -11
- package/lib/index.js.map +1 -1
- package/lib/manager/APIManager.d.ts +48 -0
- package/lib/manager/APIManager.d.ts.map +1 -0
- package/lib/manager/APIManager.js +210 -0
- package/lib/manager/APIManager.js.map +1 -0
- package/lib/manager/DFWModule.d.ts +10 -0
- package/lib/manager/DFWModule.d.ts.map +1 -0
- package/lib/manager/DFWModule.js +10 -0
- package/lib/manager/DFWModule.js.map +1 -0
- package/lib/manager/DatabaseManager.d.ts +9 -0
- package/lib/manager/DatabaseManager.d.ts.map +1 -0
- package/lib/manager/DatabaseManager.js +26 -0
- package/lib/manager/DatabaseManager.js.map +1 -0
- package/lib/manager/FileManager.d.ts +64 -0
- package/lib/manager/FileManager.d.ts.map +1 -0
- package/lib/manager/FileManager.js +206 -0
- package/lib/manager/FileManager.js.map +1 -0
- package/lib/{module → manager}/SecurityManager.d.ts +13 -13
- package/lib/manager/SecurityManager.d.ts.map +1 -0
- package/lib/{module → manager}/SecurityManager.js +36 -63
- package/lib/manager/SecurityManager.js.map +1 -0
- package/lib/manager/SessionManager.d.ts +41 -0
- package/lib/manager/SessionManager.d.ts.map +1 -0
- package/lib/manager/SessionManager.js +173 -0
- package/lib/manager/SessionManager.js.map +1 -0
- package/lib/manager/UserManager.d.ts +15 -0
- package/lib/manager/UserManager.d.ts.map +1 -0
- package/lib/manager/UserManager.js +101 -0
- package/lib/manager/UserManager.js.map +1 -0
- package/lib/test.js +25 -67
- package/lib/test.js.map +1 -1
- package/lib/types/APIListenerConfig.d.ts +46 -0
- package/lib/types/APIListenerConfig.d.ts.map +1 -0
- package/lib/types/{DFWAPIListenerConfig.js → APIListenerConfig.js} +1 -1
- package/lib/types/APIListenerConfig.js.map +1 -0
- package/lib/types/DFWBoot.d.ts +19 -0
- package/lib/types/DFWBoot.d.ts.map +1 -0
- package/lib/types/DFWBoot.js +3 -0
- package/lib/types/DFWBoot.js.map +1 -0
- package/lib/types/DFWConfig.d.ts +8 -18
- package/lib/types/DFWConfig.d.ts.map +1 -1
- package/lib/types/DFWRequestScheme.d.ts +36 -0
- package/lib/types/DFWRequestScheme.d.ts.map +1 -0
- package/lib/types/DFWRequestScheme.js +3 -0
- package/lib/types/DFWRequestScheme.js.map +1 -0
- package/package.json +31 -43
- package/prisma/schema.prisma +117 -0
- package/lib/model/dfw_access.d.ts +0 -11
- package/lib/model/dfw_access.d.ts.map +0 -1
- package/lib/model/dfw_access.js +0 -58
- package/lib/model/dfw_access.js.map +0 -1
- package/lib/model/dfw_access_credential.d.ts +0 -6
- package/lib/model/dfw_access_credential.d.ts.map +0 -1
- package/lib/model/dfw_access_credential.js +0 -41
- package/lib/model/dfw_access_credential.js.map +0 -1
- package/lib/model/dfw_credential.d.ts +0 -12
- package/lib/model/dfw_credential.d.ts.map +0 -1
- package/lib/model/dfw_credential.js +0 -100
- package/lib/model/dfw_credential.js.map +0 -1
- package/lib/model/dfw_file.d.ts +0 -23
- package/lib/model/dfw_file.d.ts.map +0 -1
- package/lib/model/dfw_file.js +0 -121
- package/lib/model/dfw_file.js.map +0 -1
- package/lib/model/dfw_session.d.ts +0 -15
- package/lib/model/dfw_session.d.ts.map +0 -1
- package/lib/model/dfw_session.js +0 -70
- package/lib/model/dfw_session.js.map +0 -1
- package/lib/model/dfw_user.d.ts +0 -31
- package/lib/model/dfw_user.d.ts.map +0 -1
- package/lib/model/dfw_user.js +0 -211
- package/lib/model/dfw_user.js.map +0 -1
- package/lib/model/dfw_users_credential.d.ts +0 -6
- package/lib/model/dfw_users_credential.d.ts.map +0 -1
- package/lib/model/dfw_users_credential.js +0 -41
- package/lib/model/dfw_users_credential.js.map +0 -1
- package/lib/module/APIManager.d.ts +0 -86
- package/lib/module/APIManager.d.ts.map +0 -1
- package/lib/module/APIManager.js +0 -267
- package/lib/module/APIManager.js.map +0 -1
- package/lib/module/DatabaseManager.d.ts +0 -21
- package/lib/module/DatabaseManager.d.ts.map +0 -1
- package/lib/module/DatabaseManager.js +0 -56
- package/lib/module/DatabaseManager.js.map +0 -1
- package/lib/module/FileManager.d.ts +0 -196
- package/lib/module/FileManager.d.ts.map +0 -1
- package/lib/module/FileManager.js +0 -434
- package/lib/module/FileManager.js.map +0 -1
- package/lib/module/SecurityManager.d.ts.map +0 -1
- package/lib/module/SecurityManager.js.map +0 -1
- package/lib/module/SessionManager.d.ts +0 -49
- package/lib/module/SessionManager.d.ts.map +0 -1
- package/lib/module/SessionManager.js +0 -220
- package/lib/module/SessionManager.js.map +0 -1
- package/lib/module/UserManager.d.ts +0 -16
- package/lib/module/UserManager.d.ts.map +0 -1
- package/lib/module/UserManager.js +0 -74
- package/lib/module/UserManager.js.map +0 -1
- package/lib/script/DFWInstance.d.ts +0 -38
- package/lib/script/DFWInstance.d.ts.map +0 -1
- package/lib/script/DFWInstance.js +0 -65
- package/lib/script/DFWInstance.js.map +0 -1
- package/lib/script/DFWModule.d.ts +0 -10
- package/lib/script/DFWModule.d.ts.map +0 -1
- package/lib/script/DFWModule.js +0 -12
- package/lib/script/DFWModule.js.map +0 -1
- package/lib/script/DFWUtils.d.ts.map +0 -1
- package/lib/script/DFWUtils.js.map +0 -1
- package/lib/types/DFWAPIListenerConfig.d.ts +0 -39
- package/lib/types/DFWAPIListenerConfig.d.ts.map +0 -1
- package/lib/types/DFWAPIListenerConfig.js.map +0 -1
- package/lib/types/DFWRequestError.d.ts +0 -9
- package/lib/types/DFWRequestError.d.ts.map +0 -1
- package/lib/types/DFWRequestError.js +0 -15
- package/lib/types/DFWRequestError.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DFWRequestScheme.js","sourceRoot":"","sources":["../../src/types/DFWRequestScheme.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,61 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scefira/dfw",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "nodejs express fast prototype library",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"lib/**/*"
|
|
8
|
+
"lib/**/*",
|
|
9
|
+
"prisma/**/*"
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
|
-
"dev": "
|
|
12
|
+
"dev": "nodemon",
|
|
12
13
|
"build": "tsc",
|
|
13
14
|
"start": "cross-env NODE_ENV=production node lib/index.js",
|
|
14
|
-
"
|
|
15
|
+
"sync": "npx prisma db push",
|
|
15
16
|
"prepublishOnly": "npm run build"
|
|
16
17
|
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"nodejs",
|
|
19
|
-
"express",
|
|
20
|
-
"backend"
|
|
21
|
-
],
|
|
22
18
|
"author": "Scefira Technologies",
|
|
23
19
|
"license": "ISC",
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@types/body-parser": "^1.19.0",
|
|
26
|
-
"@types/busboy": "^0.2.3",
|
|
27
|
-
"@types/connect-sequence": "^2.1.0",
|
|
28
|
-
"@types/cookie-parser": "^1.4.2",
|
|
29
|
-
"@types/express": "^4.17.2",
|
|
30
|
-
"@types/express-fileupload": "^1.1.0",
|
|
31
|
-
"@types/lodash": "^4.14.149",
|
|
32
|
-
"@types/md5-file": "^4.0.1",
|
|
33
|
-
"@types/node": "^12.12.24",
|
|
34
|
-
"@types/uuid": "^3.4.6",
|
|
35
|
-
"cross-env": "^5.2.1",
|
|
36
|
-
"eslint": "^5.16.0",
|
|
37
|
-
"eslint-plugin-import": "^2.19.1",
|
|
38
|
-
"nodemon": "1.19.4",
|
|
39
|
-
"ts-node": "8.5.4",
|
|
40
|
-
"ts-node-dev": "1.1.8",
|
|
41
|
-
"typescript": "4.2.4"
|
|
42
|
-
},
|
|
43
20
|
"dependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"mime-types": "^2.1.26",
|
|
53
|
-
"moment": "^2.29.1",
|
|
54
|
-
"mysql2": "2.3.0",
|
|
21
|
+
"@prisma/client": "^3.10.0",
|
|
22
|
+
"body-parser": "^1.19.2",
|
|
23
|
+
"cookie-parser": "^1.4.6",
|
|
24
|
+
"express": "^4.17.3",
|
|
25
|
+
"express-fileupload": "^1.3.1",
|
|
26
|
+
"luxon": "^2.3.1",
|
|
27
|
+
"md5-file": "^5.0.0",
|
|
28
|
+
"mime-types": "^2.1.34",
|
|
55
29
|
"node-php-password": "^0.1.2",
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
30
|
+
"uuid": "^8.3.2"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/body-parser": "^1.19.2",
|
|
34
|
+
"@types/busboy": "^1.3.0",
|
|
35
|
+
"@types/cookie-parser": "^1.4.2",
|
|
36
|
+
"@types/express": "^4.17.13",
|
|
37
|
+
"@types/express-fileupload": "^1.2.2",
|
|
38
|
+
"@types/luxon": "^2.0.9",
|
|
39
|
+
"@types/md5-file": "^5.0.0",
|
|
40
|
+
"@types/mime-types": "^2.1.1",
|
|
41
|
+
"@types/node": "^17.0.20",
|
|
42
|
+
"@types/uuid": "^8.3.4",
|
|
43
|
+
"cross-env": "^7.0.3",
|
|
44
|
+
"nodemon": "^2.0.15",
|
|
45
|
+
"prisma": "^3.10.0",
|
|
46
|
+
"ts-node": "^10.5.0",
|
|
47
|
+
"typescript": "^4.5.5"
|
|
60
48
|
}
|
|
61
49
|
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
generator client {
|
|
2
|
+
provider = "prisma-client-js"
|
|
3
|
+
previewFeatures = ["interactiveTransactions"]
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
datasource db {
|
|
7
|
+
provider = "mysql"
|
|
8
|
+
url = env("DATABASE_URL")
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
model dfw_access {
|
|
12
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
13
|
+
name String @unique @db.VarChar(255)
|
|
14
|
+
description String? @db.VarChar(255)
|
|
15
|
+
|
|
16
|
+
createdAt DateTime @default(now())
|
|
17
|
+
updatedAt DateTime @updatedAt
|
|
18
|
+
|
|
19
|
+
credentials dfw_credentials_access[]
|
|
20
|
+
|
|
21
|
+
@@index([name])
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
model dfw_credential {
|
|
25
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
26
|
+
name String @unique @db.VarChar(255)
|
|
27
|
+
description String? @db.VarChar(255)
|
|
28
|
+
|
|
29
|
+
createdAt DateTime @default(now())
|
|
30
|
+
updatedAt DateTime @updatedAt
|
|
31
|
+
|
|
32
|
+
users dfw_users_credentials[]
|
|
33
|
+
access dfw_credentials_access[]
|
|
34
|
+
|
|
35
|
+
@@index([name])
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
model dfw_file {
|
|
39
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
40
|
+
path String @db.VarChar(255)
|
|
41
|
+
description String? @db.VarChar(255)
|
|
42
|
+
idUser Int? @db.UnsignedInt
|
|
43
|
+
variant String? @db.VarChar(255)
|
|
44
|
+
size Int? @db.UnsignedInt
|
|
45
|
+
checksum String? @db.VarChar(255)
|
|
46
|
+
slug String? @db.VarChar(255)
|
|
47
|
+
mimetype String? @db.VarChar(255)
|
|
48
|
+
expire DateTime? @db.Date
|
|
49
|
+
idParent Int? @db.UnsignedInt
|
|
50
|
+
|
|
51
|
+
createdAt DateTime @default(now())
|
|
52
|
+
updatedAt DateTime @updatedAt
|
|
53
|
+
|
|
54
|
+
user dfw_user? @relation(fields: [idUser] , references: [id])
|
|
55
|
+
parent dfw_file? @relation("parent" , fields: [idParent] , references: [id])
|
|
56
|
+
children dfw_file[] @relation("parent")
|
|
57
|
+
|
|
58
|
+
@@index([expire])
|
|
59
|
+
@@index([id])
|
|
60
|
+
@@index([slug])
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
model dfw_session {
|
|
64
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
65
|
+
token String @db.Char(36)
|
|
66
|
+
agent String? @db.VarChar(255)
|
|
67
|
+
ip String? @db.VarChar(255)
|
|
68
|
+
expire DateTime? @db.Date
|
|
69
|
+
idUser Int? @db.UnsignedInt
|
|
70
|
+
|
|
71
|
+
createdAt DateTime @default(now())
|
|
72
|
+
updatedAt DateTime @updatedAt
|
|
73
|
+
|
|
74
|
+
user dfw_user? @relation( fields: [idUser] , references: [id])
|
|
75
|
+
|
|
76
|
+
@@index([idUser])
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
model dfw_user {
|
|
80
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
81
|
+
nick String @unique @db.VarChar(255)
|
|
82
|
+
email String @unique @db.VarChar(255)
|
|
83
|
+
status Int? @db.TinyInt
|
|
84
|
+
encodedKey String? @db.VarChar(255)
|
|
85
|
+
|
|
86
|
+
createdAt DateTime @default(now())
|
|
87
|
+
updatedAt DateTime @updatedAt
|
|
88
|
+
|
|
89
|
+
sessions dfw_session[]
|
|
90
|
+
credentials dfw_users_credentials[]
|
|
91
|
+
files dfw_file[]
|
|
92
|
+
|
|
93
|
+
@@index([email])
|
|
94
|
+
@@index([nick])
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Pivot tables
|
|
98
|
+
|
|
99
|
+
model dfw_credentials_access {
|
|
100
|
+
idAccess Int @db.UnsignedInt
|
|
101
|
+
idCredential Int @db.UnsignedInt
|
|
102
|
+
|
|
103
|
+
credentials dfw_credential @relation(fields: [idCredential] , references: [id])
|
|
104
|
+
access dfw_access @relation(fields: [idAccess] , references: [id])
|
|
105
|
+
|
|
106
|
+
@@id([idAccess, idCredential])
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
model dfw_users_credentials {
|
|
110
|
+
idUser Int @db.UnsignedInt
|
|
111
|
+
idCredential Int @db.UnsignedInt
|
|
112
|
+
|
|
113
|
+
user dfw_user @relation(fields: [idUser], references: [id])
|
|
114
|
+
credential dfw_credential @relation(fields: [idCredential], references: [id])
|
|
115
|
+
|
|
116
|
+
@@id([idUser, idCredential])
|
|
117
|
+
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize-typescript';
|
|
2
|
-
import dfw_credential from './dfw_credential';
|
|
3
|
-
export default class dfw_access extends Model {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
created_at: Date;
|
|
8
|
-
updated_at: Date;
|
|
9
|
-
ownedCredentials: dfw_credential[];
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=dfw_access.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_access.d.ts","sourceRoot":"","sources":["../../src/model/dfw_access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,EAA+H,MAAM,sBAAsB,CAAC;AACxL,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAI9C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK;IAKzC,EAAE,EAAG,MAAM,CAAC;IAIZ,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,EAAG,MAAM,CAAC;IAGrB,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;IAWlB,gBAAgB,EAAG,cAAc,EAAE,CAAC;CACvC"}
|
package/lib/model/dfw_access.js
DELETED
|
@@ -1,58 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
16
|
-
const dfw_credential_1 = __importDefault(require("./dfw_credential"));
|
|
17
|
-
const dfw_users_credential_1 = __importDefault(require("./dfw_users_credential"));
|
|
18
|
-
let dfw_access = class dfw_access extends sequelize_typescript_1.Model {
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
sequelize_typescript_1.PrimaryKey,
|
|
22
|
-
sequelize_typescript_1.AutoIncrement,
|
|
23
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.INTEGER.UNSIGNED),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], dfw_access.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
sequelize_typescript_1.Unique,
|
|
28
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING(32)),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], dfw_access.prototype, "name", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
sequelize_typescript_1.Column,
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], dfw_access.prototype, "description", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
sequelize_typescript_1.CreatedAt,
|
|
37
|
-
__metadata("design:type", Date)
|
|
38
|
-
], dfw_access.prototype, "created_at", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
sequelize_typescript_1.UpdatedAt,
|
|
41
|
-
__metadata("design:type", Date)
|
|
42
|
-
], dfw_access.prototype, "updated_at", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
sequelize_typescript_1.BelongsToMany(() => dfw_credential_1.default, {
|
|
45
|
-
through: {
|
|
46
|
-
model: () => dfw_users_credential_1.default,
|
|
47
|
-
unique: false,
|
|
48
|
-
},
|
|
49
|
-
foreignKey: 'idCredential',
|
|
50
|
-
constraints: false
|
|
51
|
-
}),
|
|
52
|
-
__metadata("design:type", Array)
|
|
53
|
-
], dfw_access.prototype, "ownedCredentials", void 0);
|
|
54
|
-
dfw_access = __decorate([
|
|
55
|
-
sequelize_typescript_1.Table({ tableName: "dfw_access" })
|
|
56
|
-
], dfw_access);
|
|
57
|
-
exports.default = dfw_access;
|
|
58
|
-
//# sourceMappingURL=dfw_access.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_access.js","sourceRoot":"","sources":["../../src/model/dfw_access.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAwL;AACxL,sEAA8C;AAC9C,kFAA0D;AAG1D,IAAqB,UAAU,GAA/B,MAAqB,UAAW,SAAQ,4BAAK;CA8B5C,CAAA;AAzBG;IAHC,iCAAU;IACV,oCAAa;IACb,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;;sCACtB;AAIZ;IAFC,6BAAM;IACN,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;;wCACd;AAGd;IADC,6BAAM;;+CACc;AAGrB;IADC,gCAAS;8BACG,IAAI;8CAAC;AAGlB;IADC,gCAAS;8BACG,IAAI;8CAAC;AAWlB;IARC,oCAAa,CAAC,GAAG,EAAE,CAAC,wBAAc,EAAE;QACjC,OAAO,EAAE;YACL,KAAK,EAAE,GAAG,EAAE,CAAC,8BAAoB;YACjC,MAAM,EAAE,KAAK;SAChB;QACD,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,KAAK;KACrB,CAAC;;oDACkC;AA7BnB,UAAU;IAD9B,4BAAK,CAAC,EAAE,SAAS,EAAE,YAAY,EAAC,CAAC;GACb,UAAU,CA8B9B;kBA9BoB,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_access_credential.d.ts","sourceRoot":"","sources":["../../src/model/dfw_access_credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,EAAwB,MAAM,sBAAsB,CAAC;AAYjF,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,KAAK;IAIpD,QAAQ,EAAG,MAAM,CAAC;IAIlB,YAAY,EAAG,MAAM,CAAC;CACzB"}
|
|
@@ -1,41 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
16
|
-
const dfw_credential_1 = __importDefault(require("./dfw_credential"));
|
|
17
|
-
const dfw_access_1 = __importDefault(require("./dfw_access"));
|
|
18
|
-
let dfw_access_credential = class dfw_access_credential extends sequelize_typescript_1.Model {
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
sequelize_typescript_1.ForeignKey(() => dfw_access_1.default),
|
|
22
|
-
sequelize_typescript_1.Column({ unique: false, type: sequelize_typescript_1.DataType.INTEGER.UNSIGNED }),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], dfw_access_credential.prototype, "idAccess", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
sequelize_typescript_1.ForeignKey(() => dfw_credential_1.default),
|
|
27
|
-
sequelize_typescript_1.Column({ unique: false, type: sequelize_typescript_1.DataType.INTEGER.UNSIGNED }),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], dfw_access_credential.prototype, "idCredential", void 0);
|
|
30
|
-
dfw_access_credential = __decorate([
|
|
31
|
-
sequelize_typescript_1.Table({
|
|
32
|
-
tableName: "dfw_access_credentials",
|
|
33
|
-
indexes: [{
|
|
34
|
-
unique: true,
|
|
35
|
-
fields: ['idAccess', 'idCredential'],
|
|
36
|
-
}],
|
|
37
|
-
timestamps: false
|
|
38
|
-
})
|
|
39
|
-
], dfw_access_credential);
|
|
40
|
-
exports.default = dfw_access_credential;
|
|
41
|
-
//# sourceMappingURL=dfw_access_credential.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_access_credential.js","sourceRoot":"","sources":["../../src/model/dfw_access_credential.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAiF;AACjF,sEAA8C;AAC9C,8DAAsC;AAUtC,IAAqB,qBAAqB,GAA1C,MAAqB,qBAAsB,SAAQ,4BAAK;CASvD,CAAA;AALG;IAFC,iCAAU,CAAC,GAAG,EAAE,CAAC,oBAAU,CAAC;IAC5B,6BAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;;uDACzC;AAIlB;IAFC,iCAAU,CAAC,GAAG,EAAE,CAAC,wBAAc,CAAC;IAChC,6BAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;;2DACrC;AARL,qBAAqB;IARzC,4BAAK,CAAC;QACH,SAAS,EAAE,wBAAwB;QACnC,OAAO,EAAE,CAAC;gBACN,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC;aACvC,CAAC;QACF,UAAU,EAAE,KAAK;KACpB,CAAC;GACmB,qBAAqB,CASzC;kBAToB,qBAAqB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize-typescript';
|
|
2
|
-
import dfw_access from './dfw_access';
|
|
3
|
-
export default class dfw_credential extends Model {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
created_at: Date;
|
|
8
|
-
updated_at: Date;
|
|
9
|
-
access: dfw_access[];
|
|
10
|
-
checkAccess(access: string | string[] | number | number[] | dfw_access | dfw_access[]): Promise<boolean>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=dfw_credential.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_credential.d.ts","sourceRoot":"","sources":["../../src/model/dfw_credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,EAA+H,MAAM,sBAAsB,CAAC;AAGxL,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK;IAK7C,EAAE,EAAG,MAAM,CAAC;IAKZ,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,EAAG,MAAM,CAAC;IAGrB,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;IAalB,MAAM,EAAG,UAAU,EAAE,CAAC;IAIhB,WAAW,CAAC,MAAM,EAAC,MAAM,GAAC,MAAM,EAAE,GAAC,MAAM,GAAC,MAAM,EAAE,GAAC,UAAU,GAAC,UAAU,EAAE;CA8BnF"}
|
|
@@ -1,100 +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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
-
};
|
|
23
|
-
var dfw_credential_1;
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
26
|
-
const util_1 = require("util");
|
|
27
|
-
const dfw_access_credential_1 = __importDefault(require("./dfw_access_credential"));
|
|
28
|
-
const dfw_access_1 = __importDefault(require("./dfw_access"));
|
|
29
|
-
let dfw_credential = dfw_credential_1 = class dfw_credential extends sequelize_typescript_1.Model {
|
|
30
|
-
//// Methods ////
|
|
31
|
-
checkAccess(access) {
|
|
32
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
if (Array.isArray(access)) {
|
|
34
|
-
for (var i = 0; i < access.length; i++) {
|
|
35
|
-
if ((yield this.checkAccess(access[i])) === true)
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
var ownAccess = this.access ? this.access : yield this.$get("access");
|
|
41
|
-
if (!ownAccess)
|
|
42
|
-
return false;
|
|
43
|
-
for (var i = 0; i < ownAccess.length; i++) {
|
|
44
|
-
var sample = ownAccess[i];
|
|
45
|
-
if (util_1.isNumber(access)) {
|
|
46
|
-
if (sample.id === access)
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
else if (util_1.isString(access)) {
|
|
50
|
-
if (sample.name === access)
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
else if (access instanceof dfw_credential_1) {
|
|
54
|
-
if (sample.id === access.id)
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return false;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
__decorate([
|
|
64
|
-
sequelize_typescript_1.PrimaryKey,
|
|
65
|
-
sequelize_typescript_1.AutoIncrement,
|
|
66
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.INTEGER.UNSIGNED),
|
|
67
|
-
__metadata("design:type", Number)
|
|
68
|
-
], dfw_credential.prototype, "id", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
sequelize_typescript_1.Unique,
|
|
71
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING(32)),
|
|
72
|
-
__metadata("design:type", String)
|
|
73
|
-
], dfw_credential.prototype, "name", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
sequelize_typescript_1.Column,
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], dfw_credential.prototype, "description", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
sequelize_typescript_1.CreatedAt,
|
|
80
|
-
__metadata("design:type", Date)
|
|
81
|
-
], dfw_credential.prototype, "created_at", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
sequelize_typescript_1.UpdatedAt,
|
|
84
|
-
__metadata("design:type", Date)
|
|
85
|
-
], dfw_credential.prototype, "updated_at", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
sequelize_typescript_1.BelongsToMany(() => dfw_access_1.default, {
|
|
88
|
-
through: {
|
|
89
|
-
model: () => dfw_access_credential_1.default,
|
|
90
|
-
unique: false,
|
|
91
|
-
},
|
|
92
|
-
constraints: false
|
|
93
|
-
}),
|
|
94
|
-
__metadata("design:type", Array)
|
|
95
|
-
], dfw_credential.prototype, "access", void 0);
|
|
96
|
-
dfw_credential = dfw_credential_1 = __decorate([
|
|
97
|
-
sequelize_typescript_1.Table({ tableName: "dfw_credentials" })
|
|
98
|
-
], dfw_credential);
|
|
99
|
-
exports.default = dfw_credential;
|
|
100
|
-
//# sourceMappingURL=dfw_credential.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_credential.js","sourceRoot":"","sources":["../../src/model/dfw_credential.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAwL;AACxL,+BAA0C;AAC1C,oFAA4D;AAC5D,8DAAsC;AAGtC,IAAqB,cAAc,sBAAnC,MAAqB,cAAe,SAAQ,4BAAK;IAkC7C,iBAAiB;IAEX,WAAW,CAAC,MAA8D;;YAE5E,IAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAC;gBACrB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAC;oBACjC,IAAK,CAAA,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAK,IAAI;wBAAE,OAAO,IAAI,CAAC;iBAChE;aACJ;iBAAI;gBACD,IAAI,SAAS,GAAqB,IAAI,CAAC,MAAM,CAAA,CAAC,CAAA,IAAI,CAAC,MAAM,CAAA,CAAC,CAAA,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAEpF,IAAG,CAAC,SAAS;oBAAE,OAAO,KAAK,CAAC;gBAE5B,KAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACxC,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;oBAE1B,IAAG,eAAQ,CAAC,MAAM,CAAC,EAAC;wBAChB,IAAG,MAAM,CAAC,EAAE,KAAK,MAAM;4BAAE,OAAO,IAAI,CAAC;qBACxC;yBAAK,IAAG,eAAQ,CAAC,MAAM,CAAC,EAAC;wBACtB,IAAG,MAAM,CAAC,IAAI,KAAK,MAAM;4BAAE,OAAO,IAAI,CAAC;qBAC1C;yBAAK,IAAI,MAAM,YAAY,gBAAc,EAAE;wBACxC,IAAG,MAAM,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE;4BAAE,OAAO,IAAI,CAAC;qBAC3C;iBACJ;aACJ;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAAA;CAMJ,CAAA;AA7DG;IAHC,iCAAU;IACV,oCAAa;IACb,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;;0CACtB;AAKZ;IAFC,6BAAM;IACN,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;;4CACd;AAGd;IADC,6BAAM;;mDACc;AAGrB;IADC,gCAAS;8BACG,IAAI;kDAAC;AAGlB;IADC,gCAAS;8BACG,IAAI;kDAAC;AAalB;IAPC,oCAAa,CAAC,GAAG,EAAE,CAAC,oBAAU,EAAE;QAC7B,OAAO,EAAE;YACL,KAAK,EAAE,GAAG,EAAE,CAAC,+BAAqB;YAClC,MAAM,EAAE,KAAK;SAChB;QACD,WAAW,EAAC,KAAK;KACpB,CAAC;;8CACoB;AAhCL,cAAc;IADlC,4BAAK,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAC,CAAC;GAClB,cAAc,CAkElC;kBAlEoB,cAAc"}
|
package/lib/model/dfw_file.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize-typescript';
|
|
2
|
-
export default class dfw_file extends Model {
|
|
3
|
-
id: number;
|
|
4
|
-
path: string;
|
|
5
|
-
partialPath: string;
|
|
6
|
-
name: string;
|
|
7
|
-
slug: string;
|
|
8
|
-
description: string;
|
|
9
|
-
checksum: string;
|
|
10
|
-
mimetype: string;
|
|
11
|
-
size: number;
|
|
12
|
-
idFileParent: number;
|
|
13
|
-
access: number;
|
|
14
|
-
expire: Date | null;
|
|
15
|
-
idUser?: number | null;
|
|
16
|
-
variant?: string;
|
|
17
|
-
created_at: Date;
|
|
18
|
-
updated_at: Date;
|
|
19
|
-
localPath: string;
|
|
20
|
-
url: string;
|
|
21
|
-
children: dfw_file[];
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=dfw_file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_file.d.ts","sourceRoot":"","sources":["../../src/model/dfw_file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAsG,MAAM,sBAAsB,CAAC;AAMhK,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK;IAKvC,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,EAAG,MAAM,CAAC;IAGrB,IAAI,EAAG,MAAM,CAAC;IAKd,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,EAAG,MAAM,CAAC;IAGrB,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,EAAG,MAAM,CAAC;IAGlB,IAAI,EAAG,MAAM,CAAC;IAKd,YAAY,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAG,MAAM,CAAC;IAIhB,MAAM,EAAG,IAAI,GAAC,IAAI,CAAC;IAKnB,MAAM,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;IAGrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;IASlB,SAAS,EAAE,MAAM,CAAC;IAQlB,GAAG,EAAE,MAAM,CAAC;IAKZ,QAAQ,EAAE,QAAQ,EAAE,CAAC;CAKxB"}
|
package/lib/model/dfw_file.js
DELETED
|
@@ -1,121 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
var dfw_file_1;
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
17
|
-
const dfw_user_1 = __importDefault(require("./dfw_user"));
|
|
18
|
-
const __1 = __importDefault(require(".."));
|
|
19
|
-
const FileManager_1 = __importDefault(require("../module/FileManager"));
|
|
20
|
-
let dfw_file = dfw_file_1 = class dfw_file extends sequelize_typescript_1.Model {
|
|
21
|
-
};
|
|
22
|
-
__decorate([
|
|
23
|
-
sequelize_typescript_1.PrimaryKey,
|
|
24
|
-
sequelize_typescript_1.AutoIncrement,
|
|
25
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.INTEGER.UNSIGNED),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], dfw_file.prototype, "id", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING(300)),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], dfw_file.prototype, "path", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING(100)),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], dfw_file.prototype, "partialPath", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING(300)),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], dfw_file.prototype, "name", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
sequelize_typescript_1.Unique,
|
|
42
|
-
sequelize_typescript_1.AllowNull(true),
|
|
43
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING(100)),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], dfw_file.prototype, "slug", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING()),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], dfw_file.prototype, "description", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING()),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], dfw_file.prototype, "checksum", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING()),
|
|
56
|
-
__metadata("design:type", String)
|
|
57
|
-
], dfw_file.prototype, "mimetype", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.INTEGER.UNSIGNED),
|
|
60
|
-
__metadata("design:type", Number)
|
|
61
|
-
], dfw_file.prototype, "size", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
sequelize_typescript_1.AllowNull(true),
|
|
64
|
-
sequelize_typescript_1.ForeignKey(() => dfw_file_1),
|
|
65
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.INTEGER.UNSIGNED),
|
|
66
|
-
__metadata("design:type", Number)
|
|
67
|
-
], dfw_file.prototype, "idFileParent", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.TINYINT),
|
|
70
|
-
__metadata("design:type", Number)
|
|
71
|
-
], dfw_file.prototype, "access", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
sequelize_typescript_1.AllowNull(true),
|
|
74
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.DATEONLY()),
|
|
75
|
-
__metadata("design:type", Object)
|
|
76
|
-
], dfw_file.prototype, "expire", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
sequelize_typescript_1.AllowNull(true),
|
|
79
|
-
sequelize_typescript_1.ForeignKey(() => dfw_user_1.default),
|
|
80
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.INTEGER.UNSIGNED),
|
|
81
|
-
__metadata("design:type", Object)
|
|
82
|
-
], dfw_file.prototype, "idUser", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.STRING()),
|
|
85
|
-
__metadata("design:type", String)
|
|
86
|
-
], dfw_file.prototype, "variant", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
sequelize_typescript_1.CreatedAt,
|
|
89
|
-
__metadata("design:type", Date)
|
|
90
|
-
], dfw_file.prototype, "created_at", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
sequelize_typescript_1.UpdatedAt,
|
|
93
|
-
__metadata("design:type", Date)
|
|
94
|
-
], dfw_file.prototype, "updated_at", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
sequelize_typescript_1.Column({
|
|
97
|
-
type: sequelize_typescript_1.DataType.VIRTUAL,
|
|
98
|
-
get() {
|
|
99
|
-
return __1.default.getInstance().getModule(FileManager_1.default).getFileLocalPath(this);
|
|
100
|
-
}
|
|
101
|
-
}),
|
|
102
|
-
__metadata("design:type", String)
|
|
103
|
-
], dfw_file.prototype, "localPath", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
sequelize_typescript_1.Column({
|
|
106
|
-
type: sequelize_typescript_1.DataType.VIRTUAL,
|
|
107
|
-
get() {
|
|
108
|
-
return __1.default.getInstance().getModule(FileManager_1.default).getFileURL(this);
|
|
109
|
-
}
|
|
110
|
-
}),
|
|
111
|
-
__metadata("design:type", String)
|
|
112
|
-
], dfw_file.prototype, "url", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
sequelize_typescript_1.HasMany(() => dfw_file_1, "idFileParent"),
|
|
115
|
-
__metadata("design:type", Array)
|
|
116
|
-
], dfw_file.prototype, "children", void 0);
|
|
117
|
-
dfw_file = dfw_file_1 = __decorate([
|
|
118
|
-
sequelize_typescript_1.Table({ tableName: 'dfw_files', indexes: [{ fields: ["idUser"] }] })
|
|
119
|
-
], dfw_file);
|
|
120
|
-
exports.default = dfw_file;
|
|
121
|
-
//# sourceMappingURL=dfw_file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_file.js","sourceRoot":"","sources":["../../src/model/dfw_file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAgK;AAChK,0DAAkC;AAClC,2CAAqB;AACrB,wEAAgD;AAGhD,IAAqB,QAAQ,gBAA7B,MAAqB,QAAS,SAAQ,4BAAK;CAoF1C,CAAA;AA/EG;IAHC,iCAAU;IACV,oCAAa;IACb,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;;oCACtB;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;sCACf;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;6CACR;AAGrB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;sCACf;AAKd;IAHC,6BAAM;IACN,gCAAS,CAAC,IAAI,CAAC;IACf,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;sCACf;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,EAAE,CAAC;;6CACL;AAGrB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,EAAE,CAAC;;0CACR;AAGlB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,EAAE,CAAC;;0CACR;AAGlB;IADC,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;;sCACpB;AAKd;IAHC,gCAAS,CAAC,IAAI,CAAC;IACf,iCAAU,CAAC,GAAG,EAAE,CAAC,UAAQ,CAAC;IAC1B,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;;8CACb;AAGrB;IADC,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC;;wCACT;AAIhB;IAFC,gCAAS,CAAC,IAAI,CAAC;IACf,6BAAM,CAAC,+BAAQ,CAAC,QAAQ,EAAE,CAAC;;wCACT;AAKnB;IAHC,gCAAS,CAAC,IAAI,CAAC;IACf,iCAAU,CAAC,GAAG,EAAE,CAAC,kBAAQ,CAAC;IAC1B,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;;wCACb;AAGrB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,EAAE,CAAC;;yCACT;AAGjB;IADC,gCAAS;8BACG,IAAI;4CAAC;AAGlB;IADC,gCAAS;8BACG,IAAI;4CAAC;AASlB;IANC,6BAAM,CAAC;QACJ,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,GAAG;YACC,OAAO,WAAG,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,qBAAW,CAAC,CAAC,gBAAgB,CAAC,IAAW,CAAC,CAAC;QAClF,CAAC;KACJ,CAAC;;2CACgB;AAQlB;IANC,6BAAM,CAAC;QACJ,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,GAAG;YACC,OAAO,WAAG,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,qBAAW,CAAC,CAAC,UAAU,CAAC,IAAW,CAAC,CAAC;QAC5E,CAAC;KACJ,CAAC;;qCACU;AAKZ;IADC,8BAAO,CAAC,GAAE,EAAE,CAAC,UAAQ,EAAC,cAAc,CAAC;;0CACjB;AA/EJ,QAAQ;IAD5B,4BAAK,CAAC,EAAC,SAAS,EAAE,WAAW,EAAG,OAAO,EAAC,CAAC,EAAE,MAAM,EAAC,CAAC,QAAQ,CAAC,EAAC,CAAC,EAAC,CAAC;GAC5C,QAAQ,CAoF5B;kBApFoB,QAAQ"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize-typescript';
|
|
2
|
-
import dfw_user from './dfw_user';
|
|
3
|
-
export default class dfw_session extends Model {
|
|
4
|
-
id: number;
|
|
5
|
-
token: string;
|
|
6
|
-
agent: string;
|
|
7
|
-
ip: string;
|
|
8
|
-
persist?: boolean;
|
|
9
|
-
expire: Date;
|
|
10
|
-
idUser?: number | null;
|
|
11
|
-
created_at: Date;
|
|
12
|
-
updated_at: Date;
|
|
13
|
-
user: dfw_user | null;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=dfw_session.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dfw_session.d.ts","sourceRoot":"","sources":["../../src/model/dfw_session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,EAA0H,MAAM,sBAAsB,CAAC;AACnL,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK;IAK1C,EAAE,EAAG,MAAM,CAAC;IAIZ,KAAK,EAAG,MAAM,CAAC;IAGf,KAAK,EAAG,MAAM,CAAC;IAGf,EAAE,EAAG,MAAM,CAAC;IAKZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAGlB,MAAM,EAAG,IAAI,CAAC;IAKd,MAAM,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;IAGrB,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;IAMlB,IAAI,EAAG,QAAQ,GAAC,IAAI,CAAC;CAExB"}
|