@trafficgroup/knex-rel 0.1.8 → 0.1.10
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/.claude/settings.local.json +5 -2
- package/.env.prod +5 -0
- package/CLAUDE.md +2 -11
- package/dist/constants/video.constants.d.ts +12 -0
- package/dist/constants/video.constants.js +18 -0
- package/dist/constants/video.constants.js.map +1 -0
- package/dist/dao/VideoMinuteResultDAO.d.ts +4 -1
- package/dist/dao/VideoMinuteResultDAO.js +28 -31
- package/dist/dao/VideoMinuteResultDAO.js.map +1 -1
- package/dist/dao/auth/auth.dao.js +1 -4
- package/dist/dao/auth/auth.dao.js.map +1 -1
- package/dist/dao/batch/batch.dao.js +14 -13
- package/dist/dao/batch/batch.dao.js.map +1 -1
- package/dist/dao/camera/camera.dao.d.ts +17 -7
- package/dist/dao/camera/camera.dao.js +38 -56
- package/dist/dao/camera/camera.dao.js.map +1 -1
- package/dist/dao/chat/chat.dao.d.ts +1 -1
- package/dist/dao/chat/chat.dao.js +35 -25
- package/dist/dao/chat/chat.dao.js.map +1 -1
- package/dist/dao/folder/folder.dao.js +4 -8
- package/dist/dao/folder/folder.dao.js.map +1 -1
- package/dist/dao/location/location.dao.d.ts +17 -0
- package/dist/dao/location/location.dao.js +116 -0
- package/dist/dao/location/location.dao.js.map +1 -0
- package/dist/dao/message/message.dao.d.ts +1 -1
- package/dist/dao/message/message.dao.js +26 -18
- package/dist/dao/message/message.dao.js.map +1 -1
- package/dist/dao/report-configuration/report-configuration.dao.js +31 -32
- package/dist/dao/report-configuration/report-configuration.dao.js.map +1 -1
- package/dist/dao/study/study.dao.d.ts +1 -1
- package/dist/dao/study/study.dao.js +12 -17
- package/dist/dao/study/study.dao.js.map +1 -1
- package/dist/dao/user/user.dao.js +1 -4
- package/dist/dao/user/user.dao.js.map +1 -1
- package/dist/dao/user-push-notification-token/user-push-notification-token.dao.js +8 -26
- package/dist/dao/user-push-notification-token/user-push-notification-token.dao.js.map +1 -1
- package/dist/dao/video/video.dao.d.ts +9 -1
- package/dist/dao/video/video.dao.js +73 -27
- package/dist/dao/video/video.dao.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/batch/batch.interfaces.d.ts +1 -1
- package/dist/interfaces/camera/camera.interfaces.d.ts +4 -2
- package/dist/interfaces/chat/chat.interfaces.d.ts +3 -3
- package/dist/interfaces/folder/folder.interfaces.d.ts +1 -1
- package/dist/interfaces/location/location.interfaces.d.ts +9 -0
- package/dist/interfaces/location/location.interfaces.js +3 -0
- package/dist/interfaces/location/location.interfaces.js.map +1 -0
- package/dist/interfaces/message/message.interfaces.d.ts +2 -2
- package/dist/interfaces/study/study.interfaces.d.ts +6 -5
- package/dist/interfaces/user/user.interfaces.d.ts +1 -1
- package/dist/interfaces/user-push-notification-token/user-push-notification-token.interfaces.d.ts +1 -1
- package/dist/interfaces/video/video.interfaces.d.ts +3 -2
- package/migrations/20250717160737_migration.ts +1 -1
- package/migrations/20250717160908_migration.ts +2 -5
- package/migrations/20250717161310_migration.ts +1 -1
- package/migrations/20250717161406_migration.ts +3 -3
- package/migrations/20250717162431_migration.ts +1 -1
- package/migrations/20250717173228_migration.ts +2 -2
- package/migrations/20250717204731_migration.ts +1 -1
- package/migrations/20250722210109_migration.ts +4 -8
- package/migrations/20250722211019_migration.ts +1 -1
- package/migrations/20250723153852_migration.ts +10 -13
- package/migrations/20250723162257_migration.ts +7 -4
- package/migrations/20250723171109_migration.ts +7 -4
- package/migrations/20250723205331_migration.ts +9 -6
- package/migrations/20250724191345_migration.ts +11 -8
- package/migrations/20250730180932_migration.ts +13 -14
- package/migrations/20250730213625_migration.ts +11 -8
- package/migrations/20250804124509_migration.ts +21 -26
- package/migrations/20250804132053_migration.ts +8 -5
- package/migrations/20250804164518_migration.ts +7 -7
- package/migrations/20250823223016_migration.ts +21 -32
- package/migrations/20250910015452_migration.ts +6 -18
- package/migrations/20250911000000_migration.ts +4 -18
- package/migrations/20250917144153_migration.ts +7 -14
- package/migrations/20250930200521_migration.ts +4 -8
- package/migrations/20251010143500_migration.ts +6 -27
- package/migrations/20251020225758_migration.ts +15 -51
- package/migrations/20251112120000_migration.ts +81 -0
- package/migrations/20251112120100_migration.ts +21 -0
- package/migrations/20251112120200_migration.ts +38 -0
- package/migrations/20251112120300_migration.ts +22 -0
- package/package.json +1 -1
- package/src/constants/video.constants.ts +19 -0
- package/src/d.types.ts +14 -18
- package/src/dao/VideoMinuteResultDAO.ts +54 -72
- package/src/dao/auth/auth.dao.ts +55 -58
- package/src/dao/batch/batch.dao.ts +98 -101
- package/src/dao/camera/camera.dao.ts +125 -145
- package/src/dao/chat/chat.dao.ts +43 -45
- package/src/dao/folder/folder.dao.ts +56 -59
- package/src/dao/location/location.dao.ts +101 -0
- package/src/dao/message/message.dao.ts +32 -32
- package/src/dao/report-configuration/report-configuration.dao.ts +342 -370
- package/src/dao/study/study.dao.ts +63 -88
- package/src/dao/user/user.dao.ts +50 -52
- package/src/dao/user-push-notification-token/user-push-notification-token.dao.ts +49 -83
- package/src/dao/video/video.dao.ts +339 -313
- package/src/entities/BaseEntity.ts +1 -1
- package/src/index.ts +24 -26
- package/src/interfaces/auth/auth.interfaces.ts +10 -10
- package/src/interfaces/batch/batch.interfaces.ts +1 -1
- package/src/interfaces/camera/camera.interfaces.ts +9 -7
- package/src/interfaces/chat/chat.interfaces.ts +4 -4
- package/src/interfaces/folder/folder.interfaces.ts +2 -2
- package/src/interfaces/location/location.interfaces.ts +9 -0
- package/src/interfaces/message/message.interfaces.ts +3 -3
- package/src/interfaces/report-configuration/report-configuration.interfaces.ts +16 -16
- package/src/interfaces/study/study.interfaces.ts +7 -6
- package/src/interfaces/user/user.interfaces.ts +9 -9
- package/src/interfaces/user-push-notification-token/user-push-notification-token.interfaces.ts +9 -9
- package/src/interfaces/video/video.interfaces.ts +34 -33
- package/plan.md +0 -684
|
@@ -4,103 +4,78 @@ import { IStudy } from "../../interfaces/study/study.interfaces";
|
|
|
4
4
|
import KnexManager from "../../KnexConnection";
|
|
5
5
|
|
|
6
6
|
export class StudyDAO implements IBaseDAO<IStudy> {
|
|
7
|
-
|
|
7
|
+
private _knex: Knex<any, unknown[]> = KnexManager.getConnection();
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return createdStudy;
|
|
14
|
-
}
|
|
9
|
+
async create(item: IStudy): Promise<IStudy> {
|
|
10
|
+
const [createdStudy] = await this._knex("study").insert(item).returning("*");
|
|
11
|
+
return createdStudy;
|
|
12
|
+
}
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.where("s.id", id)
|
|
26
|
-
.first();
|
|
27
|
-
return study || null;
|
|
28
|
-
}
|
|
14
|
+
async getById(id: number): Promise<IStudy | null> {
|
|
15
|
+
const study = await this._knex("study as s")
|
|
16
|
+
.innerJoin("users as u", "s.createdBy", "u.id")
|
|
17
|
+
.leftJoin("locations as l", "s.locationId", "l.id")
|
|
18
|
+
.select("s.*", this._knex.raw("to_jsonb(u.*) as user"), this._knex.raw("to_jsonb(l.*) as location"))
|
|
19
|
+
.where("s.id", id)
|
|
20
|
+
.first();
|
|
21
|
+
return study || null;
|
|
22
|
+
}
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.where("s.uuid", uuid)
|
|
40
|
-
.first();
|
|
41
|
-
return study || null;
|
|
42
|
-
}
|
|
24
|
+
async getByUuid(uuid: string): Promise<IStudy | null> {
|
|
25
|
+
const study = await this._knex("study as s")
|
|
26
|
+
.innerJoin("users as u", "s.createdBy", "u.id")
|
|
27
|
+
.leftJoin("locations as l", "s.locationId", "l.id")
|
|
28
|
+
.select("s.*", this._knex.raw("to_jsonb(u.*) as user"), this._knex.raw("to_jsonb(l.*) as location"))
|
|
29
|
+
.where("s.uuid", uuid)
|
|
30
|
+
.first();
|
|
31
|
+
return study || null;
|
|
32
|
+
}
|
|
43
33
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
.returning("*");
|
|
49
|
-
return updatedStudy || null;
|
|
50
|
-
}
|
|
34
|
+
async update(id: number, item: Partial<IStudy>): Promise<IStudy | null> {
|
|
35
|
+
const [updatedStudy] = await this._knex("study").where({ id }).update(item).returning("*");
|
|
36
|
+
return updatedStudy || null;
|
|
37
|
+
}
|
|
51
38
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
39
|
+
async delete(id: number): Promise<boolean> {
|
|
40
|
+
const result = await this._knex("study").where({ id }).del();
|
|
41
|
+
return result > 0;
|
|
42
|
+
}
|
|
56
43
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
limit: number,
|
|
60
|
-
createdBy?: number | null,
|
|
61
|
-
): Promise<IDataPaginator<IStudy>> {
|
|
62
|
-
const offset = (page - 1) * limit;
|
|
44
|
+
async getAll(page: number, limit: number, createdBy?: number | null): Promise<IDataPaginator<IStudy>> {
|
|
45
|
+
const offset = (page - 1) * limit;
|
|
63
46
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
);
|
|
72
|
-
if (createdBy !== undefined && createdBy !== null) {
|
|
73
|
-
query.where("s.createdBy", createdBy);
|
|
74
|
-
}
|
|
47
|
+
const query = this._knex("study as s")
|
|
48
|
+
.innerJoin("users as u", "s.createdBy", "u.id")
|
|
49
|
+
.leftJoin("locations as l", "s.locationId", "l.id")
|
|
50
|
+
.select("s.*", this._knex.raw("to_jsonb(u.*) as user"), this._knex.raw("to_jsonb(l.*) as location"));
|
|
51
|
+
if (createdBy !== undefined && createdBy !== null) {
|
|
52
|
+
query.where("s.createdBy", createdBy);
|
|
53
|
+
}
|
|
75
54
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
const [countResult] = await query.clone().clearSelect().count("* as count");
|
|
56
|
+
const totalCount = +countResult.count;
|
|
57
|
+
const studies = await query.clone().limit(limit).offset(offset);
|
|
79
58
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
59
|
+
return {
|
|
60
|
+
success: true,
|
|
61
|
+
data: studies,
|
|
62
|
+
page,
|
|
63
|
+
limit,
|
|
64
|
+
count: studies.length,
|
|
65
|
+
totalCount,
|
|
66
|
+
totalPages: Math.ceil(totalCount / limit),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
90
69
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
)
|
|
100
|
-
.where("s.cameraId", cameraId)
|
|
101
|
-
.orderBy("s.created_at", "desc")
|
|
102
|
-
.limit(10);
|
|
70
|
+
async getStudiesByLocation(locationId: number): Promise<IStudy[]> {
|
|
71
|
+
const studies = await this._knex("study as s")
|
|
72
|
+
.innerJoin("users as u", "s.createdBy", "u.id")
|
|
73
|
+
.leftJoin("locations as l", "s.locationId", "l.id")
|
|
74
|
+
.select("s.*", this._knex.raw("to_jsonb(u.*) as user"), this._knex.raw("to_jsonb(l.*) as location"))
|
|
75
|
+
.where("s.locationId", locationId)
|
|
76
|
+
.orderBy("s.created_at", "desc")
|
|
77
|
+
.limit(10);
|
|
103
78
|
|
|
104
|
-
|
|
105
|
-
|
|
79
|
+
return studies;
|
|
80
|
+
}
|
|
106
81
|
}
|
package/src/dao/user/user.dao.ts
CHANGED
|
@@ -4,56 +4,54 @@ import { IUser } from "../../interfaces/user/user.interfaces";
|
|
|
4
4
|
import KnexManager from "../../KnexConnection";
|
|
5
5
|
|
|
6
6
|
export class UserDAO implements IBaseDAO<IUser> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
}
|
|
7
|
+
private _knex: Knex<any, unknown[]> = KnexManager.getConnection();
|
|
8
|
+
|
|
9
|
+
async create(item: IUser): Promise<IUser> {
|
|
10
|
+
const [createdUser] = await this._knex("users").insert(item).returning("*");
|
|
11
|
+
return createdUser;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async getById(id: number): Promise<IUser | null> {
|
|
15
|
+
const user = await this._knex("users").where({ id }).first();
|
|
16
|
+
return user || null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async getByUuid(uuid: string): Promise<IUser | null> {
|
|
20
|
+
const user = await this._knex("users").where({ uuid }).first();
|
|
21
|
+
return user || null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
async getByEmail(email: string): Promise<IUser | null> {
|
|
26
|
+
const user = await this._knex("users").where({ email }).first();
|
|
27
|
+
return user || null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async update(id: number, item: Partial<IUser>): Promise<IUser | null> {
|
|
31
|
+
const [updatedUser] = await this._knex("users").where({ id }).update(item).returning("*");
|
|
32
|
+
return updatedUser || null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async delete(id: number): Promise<boolean> {
|
|
36
|
+
const result = await this._knex("users").where({ id }).del();
|
|
37
|
+
return result > 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async getAll(page: number, limit: number): Promise<IDataPaginator<IUser>> {
|
|
41
|
+
const offset = (page - 1) * limit;
|
|
42
|
+
|
|
43
|
+
const [countResult] = await this._knex("users").count("* as count");
|
|
44
|
+
const totalCount = +countResult.count;
|
|
45
|
+
const users = await this._knex("users").limit(limit).offset(offset);
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
success: true,
|
|
49
|
+
data: users,
|
|
50
|
+
page,
|
|
51
|
+
limit,
|
|
52
|
+
count: users.length,
|
|
53
|
+
totalCount,
|
|
54
|
+
totalPages: Math.ceil(totalCount / limit),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
59
57
|
}
|
|
@@ -3,97 +3,63 @@ import { IBaseDAO, IDataPaginator } from "../../d.types";
|
|
|
3
3
|
import { IUserPushNotificationToken } from "../../interfaces/user-push-notification-token/user-push-notification-token.interfaces";
|
|
4
4
|
import KnexManager from "../../KnexConnection";
|
|
5
5
|
|
|
6
|
-
export class UserPushNotificationTokenDAO
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
private _knex: Knex<any, unknown[]> = KnexManager.getConnection();
|
|
6
|
+
export class UserPushNotificationTokenDAO implements IBaseDAO<IUserPushNotificationToken> {
|
|
7
|
+
private _knex: Knex<any, unknown[]> = KnexManager.getConnection();
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.insert(item)
|
|
16
|
-
.returning("*");
|
|
17
|
-
return createdToken;
|
|
18
|
-
}
|
|
9
|
+
async create(item: IUserPushNotificationToken): Promise<IUserPushNotificationToken> {
|
|
10
|
+
const [createdToken] = await this._knex("user_push_notification_token").insert(item).returning("*");
|
|
11
|
+
return createdToken;
|
|
12
|
+
}
|
|
19
13
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return token || null;
|
|
25
|
-
}
|
|
14
|
+
async getById(id: number): Promise<IUserPushNotificationToken | null> {
|
|
15
|
+
const token = await this._knex("user_push_notification_token").where({ id }).first();
|
|
16
|
+
return token || null;
|
|
17
|
+
}
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
);
|
|
31
|
-
}
|
|
19
|
+
async getByUuid(uuid: string): Promise<IUserPushNotificationToken | null> {
|
|
20
|
+
throw new Error("Method not implemented. UserPushNotificationToken does not have UUID field.");
|
|
21
|
+
}
|
|
32
22
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
return tokens;
|
|
38
|
-
}
|
|
23
|
+
async getByUserId(userId: number): Promise<IUserPushNotificationToken[]> {
|
|
24
|
+
const tokens = await this._knex("user_push_notification_token").where({ userId });
|
|
25
|
+
return tokens;
|
|
26
|
+
}
|
|
39
27
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return tokenRecord || null;
|
|
45
|
-
}
|
|
28
|
+
async getByToken(token: string): Promise<IUserPushNotificationToken | null> {
|
|
29
|
+
const tokenRecord = await this._knex("user_push_notification_token").where({ token }).first();
|
|
30
|
+
return tokenRecord || null;
|
|
31
|
+
}
|
|
46
32
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
userId,
|
|
52
|
-
available: true,
|
|
53
|
-
});
|
|
54
|
-
return tokens;
|
|
55
|
-
}
|
|
33
|
+
async getAvailableByUserId(userId: number): Promise<IUserPushNotificationToken[]> {
|
|
34
|
+
const tokens = await this._knex("user_push_notification_token").where({ userId, available: true });
|
|
35
|
+
return tokens;
|
|
36
|
+
}
|
|
56
37
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const [updatedToken] = await this._knex("user_push_notification_token")
|
|
62
|
-
.where({ id })
|
|
63
|
-
.update(item)
|
|
64
|
-
.returning("*");
|
|
65
|
-
return updatedToken || null;
|
|
66
|
-
}
|
|
38
|
+
async update(id: number, item: Partial<IUserPushNotificationToken>): Promise<IUserPushNotificationToken | null> {
|
|
39
|
+
const [updatedToken] = await this._knex("user_push_notification_token").where({ id }).update(item).returning("*");
|
|
40
|
+
return updatedToken || null;
|
|
41
|
+
}
|
|
67
42
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return result > 0;
|
|
73
|
-
}
|
|
43
|
+
async delete(id: number): Promise<boolean> {
|
|
44
|
+
const result = await this._knex("user_push_notification_token").where({ id }).del();
|
|
45
|
+
return result > 0;
|
|
46
|
+
}
|
|
74
47
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
limit: number,
|
|
78
|
-
): Promise<IDataPaginator<IUserPushNotificationToken>> {
|
|
79
|
-
const offset = (page - 1) * limit;
|
|
48
|
+
async getAll(page: number, limit: number): Promise<IDataPaginator<IUserPushNotificationToken>> {
|
|
49
|
+
const offset = (page - 1) * limit;
|
|
80
50
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const totalCount = +countResult.count;
|
|
85
|
-
const tokens = await this._knex("user_push_notification_token")
|
|
86
|
-
.limit(limit)
|
|
87
|
-
.offset(offset);
|
|
51
|
+
const [countResult] = await this._knex("user_push_notification_token").count("* as count");
|
|
52
|
+
const totalCount = +countResult.count;
|
|
53
|
+
const tokens = await this._knex("user_push_notification_token").limit(limit).offset(offset);
|
|
88
54
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
55
|
+
return {
|
|
56
|
+
success: true,
|
|
57
|
+
data: tokens,
|
|
58
|
+
page,
|
|
59
|
+
limit,
|
|
60
|
+
count: tokens.length,
|
|
61
|
+
totalCount,
|
|
62
|
+
totalPages: Math.ceil(totalCount / limit),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|