clhq-postgres-module 1.1.0-alpha.128 → 1.1.0-alpha.130
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.
|
@@ -59,7 +59,13 @@ __decorate([
|
|
|
59
59
|
__metadata("design:type", Boolean)
|
|
60
60
|
], EditorProject.prototype, "timelineCompressed", void 0);
|
|
61
61
|
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({
|
|
62
|
+
(0, typeorm_1.Column)({
|
|
63
|
+
name: 'duration',
|
|
64
|
+
type: 'decimal',
|
|
65
|
+
precision: 10,
|
|
66
|
+
scale: 2,
|
|
67
|
+
default: 0,
|
|
68
|
+
}),
|
|
63
69
|
__metadata("design:type", Number)
|
|
64
70
|
], EditorProject.prototype, "duration", void 0);
|
|
65
71
|
__decorate([
|
|
@@ -75,7 +81,12 @@ __decorate([
|
|
|
75
81
|
__metadata("design:type", Number)
|
|
76
82
|
], EditorProject.prototype, "resolutionHeight", void 0);
|
|
77
83
|
__decorate([
|
|
78
|
-
(0, typeorm_1.Column)({
|
|
84
|
+
(0, typeorm_1.Column)({
|
|
85
|
+
name: 'background_color',
|
|
86
|
+
type: 'varchar',
|
|
87
|
+
length: 50,
|
|
88
|
+
default: '#000000',
|
|
89
|
+
}),
|
|
79
90
|
__metadata("design:type", String)
|
|
80
91
|
], EditorProject.prototype, "backgroundColor", void 0);
|
|
81
92
|
__decorate([
|
|
@@ -119,7 +130,12 @@ __decorate([
|
|
|
119
130
|
__metadata("design:type", Array)
|
|
120
131
|
], EditorProject.prototype, "tags", void 0);
|
|
121
132
|
__decorate([
|
|
122
|
-
(0, typeorm_1.Column)({
|
|
133
|
+
(0, typeorm_1.Column)({
|
|
134
|
+
name: 'template_category',
|
|
135
|
+
type: 'varchar',
|
|
136
|
+
length: 100,
|
|
137
|
+
nullable: true,
|
|
138
|
+
}),
|
|
123
139
|
__metadata("design:type", String)
|
|
124
140
|
], EditorProject.prototype, "templateCategory", void 0);
|
|
125
141
|
__decorate([
|
|
@@ -16,14 +16,14 @@ export declare class Scene {
|
|
|
16
16
|
projectId: string;
|
|
17
17
|
name: string;
|
|
18
18
|
description: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
start: number;
|
|
20
|
+
end: number;
|
|
21
|
+
duration: number;
|
|
22
22
|
thumbnailUrl: string;
|
|
23
23
|
thumbnailStatus: SceneThumbnailStatus;
|
|
24
24
|
color: string;
|
|
25
25
|
transitionType: TransitionType;
|
|
26
|
-
|
|
26
|
+
transitionDuration: number;
|
|
27
27
|
transitionToSceneId: string;
|
|
28
28
|
locked: boolean;
|
|
29
29
|
collapsed: boolean;
|
|
@@ -46,17 +46,17 @@ __decorate([
|
|
|
46
46
|
__metadata("design:type", String)
|
|
47
47
|
], Scene.prototype, "description", void 0);
|
|
48
48
|
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ name: '
|
|
49
|
+
(0, typeorm_1.Column)({ name: 'start', type: 'decimal', precision: 10, scale: 3 }),
|
|
50
50
|
__metadata("design:type", Number)
|
|
51
|
-
], Scene.prototype, "
|
|
51
|
+
], Scene.prototype, "start", void 0);
|
|
52
52
|
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({ name: '
|
|
53
|
+
(0, typeorm_1.Column)({ name: 'end', type: 'decimal', precision: 10, scale: 3 }),
|
|
54
54
|
__metadata("design:type", Number)
|
|
55
|
-
], Scene.prototype, "
|
|
55
|
+
], Scene.prototype, "end", void 0);
|
|
56
56
|
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({ name: '
|
|
57
|
+
(0, typeorm_1.Column)({ name: 'duration', type: 'decimal', precision: 10, scale: 3, insert: false, update: false }),
|
|
58
58
|
__metadata("design:type", Number)
|
|
59
|
-
], Scene.prototype, "
|
|
59
|
+
], Scene.prototype, "duration", void 0);
|
|
60
60
|
__decorate([
|
|
61
61
|
(0, typeorm_1.Column)({ name: 'thumbnail_url', type: 'text', nullable: true }),
|
|
62
62
|
__metadata("design:type", String)
|
|
@@ -84,9 +84,9 @@ __decorate([
|
|
|
84
84
|
__metadata("design:type", String)
|
|
85
85
|
], Scene.prototype, "transitionType", void 0);
|
|
86
86
|
__decorate([
|
|
87
|
-
(0, typeorm_1.Column)({ name: '
|
|
87
|
+
(0, typeorm_1.Column)({ name: 'transition_duration', type: 'decimal', precision: 10, scale: 3, nullable: true }),
|
|
88
88
|
__metadata("design:type", Number)
|
|
89
|
-
], Scene.prototype, "
|
|
89
|
+
], Scene.prototype, "transitionDuration", void 0);
|
|
90
90
|
__decorate([
|
|
91
91
|
(0, typeorm_1.Column)({ name: 'transition_to_scene_id', type: 'varchar', length: 36, nullable: true }),
|
|
92
92
|
__metadata("design:type", String)
|
|
@@ -115,5 +115,5 @@ exports.Scene = Scene = __decorate([
|
|
|
115
115
|
(0, typeorm_1.Entity)('scenes'),
|
|
116
116
|
(0, typeorm_1.Index)(['projectId']),
|
|
117
117
|
(0, typeorm_1.Index)(['projectId', 'sortOrder']),
|
|
118
|
-
(0, typeorm_1.Index)(['projectId', '
|
|
118
|
+
(0, typeorm_1.Index)(['projectId', 'start', 'end'])
|
|
119
119
|
], Scene);
|
|
@@ -7,14 +7,14 @@ export declare class SceneRepository extends BaseRepository<Scene> {
|
|
|
7
7
|
findByProject(projectId: string): Promise<Scene[]>;
|
|
8
8
|
findByProjectWithItems(projectId: string): Promise<Scene[]>;
|
|
9
9
|
findByIdWithProject(id: string): Promise<Scene | null>;
|
|
10
|
-
findInTimeRange(projectId: string,
|
|
10
|
+
findInTimeRange(projectId: string, start: number, end: number): Promise<Scene[]>;
|
|
11
11
|
updateSortOrders(updates: {
|
|
12
12
|
id: string;
|
|
13
13
|
sortOrder: number;
|
|
14
14
|
}[]): Promise<void>;
|
|
15
15
|
deleteByProject(projectId: string): Promise<number>;
|
|
16
16
|
countByProject(projectId: string): Promise<number>;
|
|
17
|
-
findOverlapping(projectId: string,
|
|
17
|
+
findOverlapping(projectId: string, start: number, end: number, excludeId?: string): Promise<Scene[]>;
|
|
18
18
|
findByThumbnailStatus(status: string, limit?: number): Promise<Scene[]>;
|
|
19
19
|
updateThumbnailStatus(ids: string[], status: string): Promise<void>;
|
|
20
20
|
getNextSortOrder(projectId: string): Promise<number>;
|
|
@@ -42,12 +42,12 @@ let SceneRepository = class SceneRepository extends base_repository_1.BaseReposi
|
|
|
42
42
|
relations: ['project'],
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
async findInTimeRange(projectId,
|
|
45
|
+
async findInTimeRange(projectId, start, end) {
|
|
46
46
|
return this.sceneRepository
|
|
47
47
|
.createQueryBuilder('scene')
|
|
48
48
|
.where('scene.projectId = :projectId', { projectId })
|
|
49
|
-
.andWhere('scene.
|
|
50
|
-
.andWhere('scene.
|
|
49
|
+
.andWhere('scene.start < :end', { end })
|
|
50
|
+
.andWhere('scene.end > :start', { start })
|
|
51
51
|
.orderBy('scene.sortOrder', 'ASC')
|
|
52
52
|
.getMany();
|
|
53
53
|
}
|
|
@@ -62,12 +62,12 @@ let SceneRepository = class SceneRepository extends base_repository_1.BaseReposi
|
|
|
62
62
|
async countByProject(projectId) {
|
|
63
63
|
return this.sceneRepository.count({ where: { projectId } });
|
|
64
64
|
}
|
|
65
|
-
async findOverlapping(projectId,
|
|
65
|
+
async findOverlapping(projectId, start, end, excludeId) {
|
|
66
66
|
const query = this.sceneRepository
|
|
67
67
|
.createQueryBuilder('scene')
|
|
68
68
|
.where('scene.projectId = :projectId', { projectId })
|
|
69
|
-
.andWhere('scene.
|
|
70
|
-
.andWhere('scene.
|
|
69
|
+
.andWhere('scene.start < :end', { end })
|
|
70
|
+
.andWhere('scene.end > :start', { start });
|
|
71
71
|
if (excludeId) {
|
|
72
72
|
query.andWhere('scene.id != :excludeId', { excludeId });
|
|
73
73
|
}
|