@ooneex/typeorm 0.0.1 → 0.4.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/dist/shared/chunk-19qhst35.js +5 -0
- package/dist/shared/chunk-19qhst35.js.map +12 -0
- package/dist/shared/chunk-31y260d6.js +101 -0
- package/dist/shared/chunk-31y260d6.js.map +11 -0
- package/dist/shared/chunk-59vwmfpm.js +5 -0
- package/dist/shared/chunk-59vwmfpm.js.map +9 -0
- package/dist/shared/chunk-5tnqjb3n.js +5 -0
- package/dist/shared/{chunk-eh420jqn.js.map → chunk-5tnqjb3n.js.map} +2 -2
- package/dist/shared/chunk-5ybg5hda.js +5 -0
- package/dist/shared/{chunk-pwhygf44.js.map → chunk-5ybg5hda.js.map} +2 -2
- package/dist/shared/chunk-6jnj2pfx.js +5 -0
- package/dist/shared/chunk-6jnj2pfx.js.map +10 -0
- package/dist/shared/chunk-6kdkyjbn.js +5 -0
- package/dist/shared/chunk-6kdkyjbn.js.map +10 -0
- package/dist/shared/chunk-aj0aak90.js +42 -0
- package/dist/shared/chunk-aj0aak90.js.map +10 -0
- package/dist/shared/chunk-e51ktjsq.js +5 -0
- package/dist/shared/chunk-e51ktjsq.js.map +18 -0
- package/dist/shared/chunk-jr0xys18.js +36 -0
- package/dist/shared/chunk-jr0xys18.js.map +10 -0
- package/dist/shared/chunk-kw4t1san.js +5 -0
- package/dist/shared/{chunk-wawk30n1.js.map → chunk-kw4t1san.js.map} +9 -4
- package/dist/shared/chunk-nfv9ce7v.js +5 -0
- package/dist/shared/{chunk-wmftwzcs.js.map → chunk-nfv9ce7v.js.map} +2 -2
- package/dist/shared/chunk-p22keb3y.js +5 -0
- package/dist/shared/{chunk-2e7zbxcq.js.map → chunk-p22keb3y.js.map} +2 -2
- package/dist/shared/chunk-pbns711f.js +5 -0
- package/dist/shared/chunk-pbns711f.js.map +10 -0
- package/dist/shared/chunk-qrs0g3m9.js +51 -0
- package/dist/shared/chunk-qrs0g3m9.js.map +10 -0
- package/dist/shared/chunk-qyf32qsz.js +82 -0
- package/dist/shared/chunk-qyf32qsz.js.map +10 -0
- package/dist/shared/chunk-t1jad451.js +5 -0
- package/dist/shared/chunk-t1jad451.js.map +21 -0
- package/dist/shared/chunk-t5cy307m.js +5 -0
- package/dist/shared/chunk-t5cy307m.js.map +10 -0
- package/dist/shared/chunk-x2d798hg.js +5 -0
- package/dist/shared/chunk-x2d798hg.js.map +11 -0
- package/dist/shared/chunk-x3pmm3na.js +5 -0
- package/dist/shared/chunk-x3pmm3na.js.map +21 -0
- package/dist/shared/chunk-xrqhqgen.js +5 -0
- package/dist/shared/{chunk-j7nprmyh.js.map → chunk-xrqhqgen.js.map} +2 -2
- package/dist/shared/chunk-xwe8m6av.js +5 -0
- package/dist/shared/{chunk-zmzz7hqq.js.map → chunk-xwe8m6av.js.map} +2 -2
- package/dist/shared/chunk-yrwsqc6r.js +5 -0
- package/dist/shared/chunk-yrwsqc6r.js.map +21 -0
- package/dist/src/entities/book/index.d.ts +80 -3
- package/dist/src/entities/book/index.js +2 -2
- package/dist/src/entities/book/index.js.map +1 -1
- package/dist/src/entities/common/index.d.ts +21 -28
- package/dist/src/entities/common/index.js +2 -2
- package/dist/src/entities/common/index.js.map +1 -1
- package/dist/src/entities/country/index.d.ts +21 -0
- package/dist/src/entities/country/index.js +4 -0
- package/dist/src/entities/country/index.js.map +9 -0
- package/dist/src/entities/currency/index.d.ts +23 -0
- package/dist/src/entities/currency/index.js +4 -0
- package/dist/src/entities/currency/index.js.map +9 -0
- package/dist/src/entities/folder/index.d.ts +104 -0
- package/dist/src/entities/folder/index.js +4 -0
- package/dist/src/entities/folder/index.js.map +19 -0
- package/dist/src/entities/gamification/flashcard/index.js +2 -2
- package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
- package/dist/src/entities/gamification/index.js +2 -2
- package/dist/src/entities/gamification/index.js.map +1 -1
- package/dist/src/entities/gamification/mcq/index.d.ts +76 -7
- package/dist/src/entities/gamification/mcq/index.js +2 -2
- package/dist/src/entities/gamification/mcq/index.js.map +1 -1
- package/dist/src/entities/image/index.d.ts +83 -6
- package/dist/src/entities/image/index.js +2 -2
- package/dist/src/entities/image/index.js.map +1 -1
- package/dist/src/entities/medecine/index.d.ts +36 -0
- package/dist/src/entities/medecine/index.js +4 -0
- package/dist/src/entities/medecine/index.js.map +9 -0
- package/dist/src/entities/payment/index.js +2 -2
- package/dist/src/entities/payment/index.js.map +1 -1
- package/dist/src/entities/user/index.d.ts +48 -7
- package/dist/src/entities/user/index.js +2 -2
- package/dist/src/entities/user/index.js.map +1 -1
- package/dist/src/entities/video/index.d.ts +88 -10
- package/dist/src/entities/video/index.js +2 -2
- package/dist/src/entities/video/index.js.map +1 -1
- package/dist/src/migrations/book/index.d.ts +97 -0
- package/dist/src/migrations/book/index.js +516 -0
- package/dist/src/migrations/book/index.js.map +21 -0
- package/dist/src/migrations/common/index.d.ts +41 -0
- package/dist/src/migrations/common/index.js +57 -0
- package/dist/src/migrations/common/index.js.map +10 -0
- package/dist/src/migrations/country/index.d.ts +9 -0
- package/dist/src/migrations/country/index.js +40 -0
- package/dist/src/migrations/country/index.js.map +10 -0
- package/dist/src/migrations/currency/index.d.ts +9 -0
- package/dist/src/migrations/currency/index.js +44 -0
- package/dist/src/migrations/currency/index.js.map +10 -0
- package/dist/src/migrations/folder/index.d.ts +81 -0
- package/dist/src/migrations/folder/index.js +387 -0
- package/dist/src/migrations/folder/index.js.map +19 -0
- package/dist/src/migrations/gamification/flashcard/index.d.ts +57 -0
- package/dist/src/migrations/gamification/flashcard/index.js +420 -0
- package/dist/src/migrations/gamification/flashcard/index.js.map +16 -0
- package/dist/src/migrations/gamification/index.d.ts +9 -0
- package/dist/src/migrations/gamification/index.js +4 -0
- package/dist/src/migrations/gamification/index.js.map +9 -0
- package/dist/src/migrations/gamification/mcq/index.d.ts +97 -0
- package/dist/src/migrations/gamification/mcq/index.js +526 -0
- package/dist/src/migrations/gamification/mcq/index.js.map +21 -0
- package/dist/src/migrations/image/index.d.ts +81 -0
- package/dist/src/migrations/image/index.js +328 -0
- package/dist/src/migrations/image/index.js.map +18 -0
- package/dist/src/migrations/medecine/index.d.ts +25 -0
- package/dist/src/migrations/medecine/index.js +119 -0
- package/dist/src/migrations/medecine/index.js.map +12 -0
- package/dist/src/migrations/payment/index.d.ts +49 -0
- package/dist/src/migrations/payment/index.js +352 -0
- package/dist/src/migrations/payment/index.js.map +15 -0
- package/dist/src/migrations/user/index.d.ts +81 -0
- package/dist/src/migrations/user/index.js +309 -0
- package/dist/src/migrations/user/index.js.map +19 -0
- package/dist/src/migrations/video/index.d.ts +97 -0
- package/dist/src/migrations/video/index.js +289 -0
- package/dist/src/migrations/video/index.js.map +21 -0
- package/dist/src/repositories/book/index.d.ts +310 -35
- package/dist/src/repositories/book/index.js +2 -2
- package/dist/src/repositories/book/index.js.map +15 -6
- package/dist/src/repositories/common/index.d.ts +65 -94
- package/dist/src/repositories/common/index.js +2 -2
- package/dist/src/repositories/common/index.js.map +8 -9
- package/dist/src/repositories/country/index.d.ts +42 -0
- package/dist/src/repositories/country/index.js +4 -0
- package/dist/src/repositories/country/index.js.map +10 -0
- package/dist/src/repositories/currency/index.d.ts +44 -0
- package/dist/src/repositories/currency/index.js +4 -0
- package/dist/src/repositories/currency/index.js.map +10 -0
- package/dist/src/repositories/gamification/flashcard/index.d.ts +14 -14
- package/dist/src/repositories/gamification/flashcard/index.js +2 -2
- package/dist/src/repositories/gamification/flashcard/index.js.map +9 -9
- package/dist/src/repositories/gamification/index.d.ts +328 -83
- package/dist/src/repositories/gamification/index.js +2 -2
- package/dist/src/repositories/gamification/index.js.map +3 -3
- package/dist/src/repositories/gamification/mcq/index.d.ts +299 -54
- package/dist/src/repositories/gamification/mcq/index.js +2 -2
- package/dist/src/repositories/gamification/mcq/index.js.map +15 -7
- package/dist/src/repositories/image/index.d.ts +295 -20
- package/dist/src/repositories/image/index.js +2 -2
- package/dist/src/repositories/image/index.js.map +13 -4
- package/dist/src/repositories/medecine/index.d.ts +99 -0
- package/dist/src/repositories/medecine/index.js +4 -0
- package/dist/src/repositories/medecine/index.js.map +12 -0
- package/dist/src/repositories/payment/index.d.ts +12 -12
- package/dist/src/repositories/payment/index.js +2 -2
- package/dist/src/repositories/payment/index.js.map +8 -8
- package/dist/src/repositories/user/index.d.ts +210 -59
- package/dist/src/repositories/user/index.js +2 -2
- package/dist/src/repositories/user/index.js.map +13 -8
- package/dist/src/repositories/video/index.d.ts +330 -54
- package/dist/src/repositories/video/index.js +2 -2
- package/dist/src/repositories/video/index.js.map +15 -6
- package/package.json +188 -58
- package/dist/ooneex-typeorm-0.0.1.tgz +0 -0
- package/dist/shared/chunk-2e7zbxcq.js +0 -5
- package/dist/shared/chunk-764bzjhz.js +0 -5
- package/dist/shared/chunk-764bzjhz.js.map +0 -12
- package/dist/shared/chunk-eh420jqn.js +0 -5
- package/dist/shared/chunk-gjsgnzaq.js +0 -5
- package/dist/shared/chunk-gjsgnzaq.js.map +0 -10
- package/dist/shared/chunk-hw4vdg6q.js +0 -5
- package/dist/shared/chunk-hw4vdg6q.js.map +0 -10
- package/dist/shared/chunk-j7nprmyh.js +0 -5
- package/dist/shared/chunk-kgxsdeye.js +0 -5
- package/dist/shared/chunk-kgxsdeye.js.map +0 -13
- package/dist/shared/chunk-ntrrrvwt.js +0 -5
- package/dist/shared/chunk-ntrrrvwt.js.map +0 -12
- package/dist/shared/chunk-pwhygf44.js +0 -5
- package/dist/shared/chunk-sd6mmec6.js +0 -5
- package/dist/shared/chunk-sd6mmec6.js.map +0 -12
- package/dist/shared/chunk-wawk30n1.js +0 -5
- package/dist/shared/chunk-wmftwzcs.js +0 -5
- package/dist/shared/chunk-zmzz7hqq.js +0 -5
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["src/repositories/video/VideoPlaylistRepository.ts", "src/repositories/video/VideoProgressRepository.ts", "src/repositories/video/VideoRepository.ts"],
|
|
3
|
+
"sources": ["src/repositories/video/VideoCommentRepository.ts", "src/repositories/video/VideoDislikedRepository.ts", "src/repositories/video/VideoDownloadedRepository.ts", "src/repositories/video/VideoLikedRepository.ts", "src/repositories/video/VideoPlaylistRepository.ts", "src/repositories/video/VideoProgressRepository.ts", "src/repositories/video/VideoReportRepository.ts", "src/repositories/video/VideoRepository.ts", "src/repositories/video/VideoSavedRepository.ts", "src/repositories/video/VideoSharedRepository.ts", "src/repositories/video/VideoStatRepository.ts", "src/repositories/video/VideoViewedRepository.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { inject } from \"@ooneex/container\";\nimport type {
|
|
6
|
-
"import { inject } from \"@ooneex/container\";\nimport type {
|
|
7
|
-
"import { inject } from \"@ooneex/container\";\nimport type {
|
|
5
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoCommentEntity } from \"../../entities/video/VideoCommentEntity\";\n\n@decorator.repository()\nexport class VideoCommentRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoCommentEntity>> {\n return await this.database.open(VideoCommentEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoCommentEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoCommentEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoCommentEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoCommentEntity>): Promise<VideoCommentEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoCommentEntity, options?: SaveOptions): Promise<VideoCommentEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoCommentEntity[], options?: SaveOptions): Promise<VideoCommentEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoCommentEntity, options?: SaveOptions): Promise<VideoCommentEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoCommentEntity[], options?: SaveOptions): Promise<VideoCommentEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoCommentEntity> | FindOptionsWhere<VideoCommentEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoCommentEntity> | FindOptionsWhere<VideoCommentEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
6
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoDislikedEntity } from \"../../entities/video/VideoDislikedEntity\";\n\n@decorator.repository()\nexport class VideoDislikedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoDislikedEntity>> {\n return await this.database.open(VideoDislikedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoDislikedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoDislikedEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoDislikedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoDislikedEntity>): Promise<VideoDislikedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoDislikedEntity, options?: SaveOptions): Promise<VideoDislikedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoDislikedEntity[], options?: SaveOptions): Promise<VideoDislikedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoDislikedEntity, options?: SaveOptions): Promise<VideoDislikedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoDislikedEntity[], options?: SaveOptions): Promise<VideoDislikedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoDislikedEntity> | FindOptionsWhere<VideoDislikedEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoDislikedEntity> | FindOptionsWhere<VideoDislikedEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
7
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoDownloadedEntity } from \"../../entities/video/VideoDownloadedEntity\";\n\n@decorator.repository()\nexport class VideoDownloadedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoDownloadedEntity>> {\n return await this.database.open(VideoDownloadedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoDownloadedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoDownloadedEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoDownloadedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoDownloadedEntity>): Promise<VideoDownloadedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoDownloadedEntity, options?: SaveOptions): Promise<VideoDownloadedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoDownloadedEntity[], options?: SaveOptions): Promise<VideoDownloadedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoDownloadedEntity, options?: SaveOptions): Promise<VideoDownloadedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoDownloadedEntity[], options?: SaveOptions): Promise<VideoDownloadedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoDownloadedEntity> | FindOptionsWhere<VideoDownloadedEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoDownloadedEntity> | FindOptionsWhere<VideoDownloadedEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
8
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoLikedEntity } from \"../../entities/video/VideoLikedEntity\";\n\n@decorator.repository()\nexport class VideoLikedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoLikedEntity>> {\n return await this.database.open(VideoLikedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoLikedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoLikedEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoLikedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoLikedEntity>): Promise<VideoLikedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoLikedEntity, options?: SaveOptions): Promise<VideoLikedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoLikedEntity[], options?: SaveOptions): Promise<VideoLikedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoLikedEntity, options?: SaveOptions): Promise<VideoLikedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoLikedEntity[], options?: SaveOptions): Promise<VideoLikedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoLikedEntity> | FindOptionsWhere<VideoLikedEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoLikedEntity> | FindOptionsWhere<VideoLikedEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
9
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { VideoPlaylistEntity } from \"../../entities/video/VideoPlaylistEntity\";\n\n@decorator.repository()\nexport class VideoPlaylistRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoPlaylistEntity>> {\n return await this.database.open(VideoPlaylistEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoPlaylistEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoPlaylistEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply playlist search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n const searchConditions = [{ name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n findOptions = {\n ...findOptions,\n where: rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions,\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including search\n let countWhere = rest.where;\n if (q) {\n const searchConditions = [{ name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n countWhere = rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions;\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoPlaylistEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoPlaylistEntity>): Promise<VideoPlaylistEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoPlaylistEntity, options?: SaveOptions): Promise<VideoPlaylistEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoPlaylistEntity[], options?: SaveOptions): Promise<VideoPlaylistEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoPlaylistEntity, options?: SaveOptions): Promise<VideoPlaylistEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoPlaylistEntity[], options?: SaveOptions): Promise<VideoPlaylistEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoPlaylistEntity> | FindOptionsWhere<VideoPlaylistEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoPlaylistEntity> | FindOptionsWhere<VideoPlaylistEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
10
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoProgressEntity } from \"../../entities/video/VideoProgressEntity\";\n\n@decorator.repository()\nexport class VideoProgressRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoProgressEntity>> {\n return await this.database.open(VideoProgressEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoProgressEntity> & { page?: number; limit?: number },\n ): Promise<FilterResultType<VideoProgressEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoProgressEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoProgressEntity>): Promise<VideoProgressEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoProgressEntity, options?: SaveOptions): Promise<VideoProgressEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoProgressEntity[], options?: SaveOptions): Promise<VideoProgressEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoProgressEntity, options?: SaveOptions): Promise<VideoProgressEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoProgressEntity[], options?: SaveOptions): Promise<VideoProgressEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoProgressEntity> | FindOptionsWhere<VideoProgressEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoProgressEntity> | FindOptionsWhere<VideoProgressEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
11
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoReportEntity } from \"../../entities/video/VideoReportEntity\";\n\n@decorator.repository()\nexport class VideoReportRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoReportEntity>> {\n return await this.database.open(VideoReportEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoReportEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoReportEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoReportEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoReportEntity>): Promise<VideoReportEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoReportEntity, options?: SaveOptions): Promise<VideoReportEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoReportEntity[], options?: SaveOptions): Promise<VideoReportEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoReportEntity, options?: SaveOptions): Promise<VideoReportEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoReportEntity[], options?: SaveOptions): Promise<VideoReportEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoReportEntity> | FindOptionsWhere<VideoReportEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoReportEntity> | FindOptionsWhere<VideoReportEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
12
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { VideoEntity } from \"../../entities/video/VideoEntity\";\n\n@decorator.repository()\nexport class VideoRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoEntity>> {\n return await this.database.open(VideoEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply video search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n const searchConditions = [\n { title: ILike(`%${q}%`) },\n { subtitle: ILike(`%${q}%`) },\n { description: ILike(`%${q}%`) },\n ];\n\n findOptions = {\n ...findOptions,\n where: rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions,\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including search\n let countWhere = rest.where;\n if (q) {\n const searchConditions = [\n { title: ILike(`%${q}%`) },\n { subtitle: ILike(`%${q}%`) },\n { description: ILike(`%${q}%`) },\n ];\n\n countWhere = rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions;\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoEntity>): Promise<VideoEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoEntity, options?: SaveOptions): Promise<VideoEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoEntity[], options?: SaveOptions): Promise<VideoEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoEntity, options?: SaveOptions): Promise<VideoEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoEntity[], options?: SaveOptions): Promise<VideoEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoEntity> | FindOptionsWhere<VideoEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(criteria?: FindOptionsWhere<VideoEntity> | FindOptionsWhere<VideoEntity>[]): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
13
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoSavedEntity } from \"../../entities/video/VideoSavedEntity\";\n\n@decorator.repository()\nexport class VideoSavedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoSavedEntity>> {\n return await this.database.open(VideoSavedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoSavedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoSavedEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoSavedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoSavedEntity>): Promise<VideoSavedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoSavedEntity, options?: SaveOptions): Promise<VideoSavedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoSavedEntity[], options?: SaveOptions): Promise<VideoSavedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoSavedEntity, options?: SaveOptions): Promise<VideoSavedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoSavedEntity[], options?: SaveOptions): Promise<VideoSavedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoSavedEntity> | FindOptionsWhere<VideoSavedEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoSavedEntity> | FindOptionsWhere<VideoSavedEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
14
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoSharedEntity } from \"../../entities/video/VideoSharedEntity\";\n\n@decorator.repository()\nexport class VideoSharedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoSharedEntity>> {\n return await this.database.open(VideoSharedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoSharedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoSharedEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoSharedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoSharedEntity>): Promise<VideoSharedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoSharedEntity, options?: SaveOptions): Promise<VideoSharedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoSharedEntity[], options?: SaveOptions): Promise<VideoSharedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoSharedEntity, options?: SaveOptions): Promise<VideoSharedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoSharedEntity[], options?: SaveOptions): Promise<VideoSharedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoSharedEntity> | FindOptionsWhere<VideoSharedEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoSharedEntity> | FindOptionsWhere<VideoSharedEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
15
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoStatEntity } from \"../../entities/video/VideoStatEntity\";\n\n@decorator.repository()\nexport class VideoStatRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoStatEntity>> {\n return await this.database.open(VideoStatEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoStatEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoStatEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoStatEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoStatEntity>): Promise<VideoStatEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoStatEntity, options?: SaveOptions): Promise<VideoStatEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoStatEntity[], options?: SaveOptions): Promise<VideoStatEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoStatEntity, options?: SaveOptions): Promise<VideoStatEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoStatEntity[], options?: SaveOptions): Promise<VideoStatEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoStatEntity> | FindOptionsWhere<VideoStatEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoStatEntity> | FindOptionsWhere<VideoStatEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
|
|
16
|
+
"import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { VideoViewedEntity } from \"../../entities/video/VideoViewedEntity\";\n\n@decorator.repository()\nexport class VideoViewedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<VideoViewedEntity>> {\n return await this.database.open(VideoViewedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<VideoViewedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<VideoViewedEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<VideoViewedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<VideoViewedEntity>): Promise<VideoViewedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: VideoViewedEntity, options?: SaveOptions): Promise<VideoViewedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: VideoViewedEntity[], options?: SaveOptions): Promise<VideoViewedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: VideoViewedEntity, options?: SaveOptions): Promise<VideoViewedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: VideoViewedEntity[], options?: SaveOptions): Promise<VideoViewedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<VideoViewedEntity> | FindOptionsWhere<VideoViewedEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<VideoViewedEntity> | FindOptionsWhere<VideoViewedEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n"
|
|
8
17
|
],
|
|
9
|
-
"mappings": ";oMAAA,yBAAS,kCAIT,wBAAS,gBAGF,MAAM,CAAwB,CAGhB,SAFnB,WAAW,CAEQ,EACjB,CADiB,qBAGN,KAAI,EAA6C,CAC5D,OAAO,MAAM,KAAK,SAAS,KAAK,CAAmB,OAGxC,MAAK,EAAkB,CAClC,MAAM,KAAK,SAAS,MAAM,OAGf,KAAI,CACf,EACgD,CAChD,IAAM,EAAa,MAAM,KAAK,KAAK,GAE3B,OAAO,EAAG,QAAQ,IAAK,OAAM,GAAS,EAE1C,EACE,EAAO,IAAU,EAAI,IAAM,EAEjC,GAAI,GAAQ,EAAO,GAAK,GAAS,EAAQ,EACvC,GAAQ,EAAO,GAAK,EAItB,IAAI,EAAc,IAAK,EAAM,UAAU,IAAS,QAAa,CAAE,MAAK,CAAG,EACvE,GAAI,EAAG,CACL,IAAM,EAAmB,CAAC,CAAE,KAAM,EAAM,IAAI,IAAI,CAAE,EAAG,CAAE,YAAa,EAAM,IAAI,IAAI,CAAE,CAAC,EAErF,EAAc,IACT,EACH,M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AM",
|
|
19
|
+
"debugId": "F9B81E93DBCDEB7164756E2164756E21",
|
|
11
20
|
"names": []
|
|
12
21
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/typeorm",
|
|
3
|
-
"description": "",
|
|
4
|
-
"version": "0.0
|
|
3
|
+
"description": "Pre-built TypeORM entities, migrations, and repositories for common domain models",
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -10,112 +10,232 @@
|
|
|
10
10
|
"package.json"
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
|
-
"./
|
|
13
|
+
"./migrations/gamification/mcq": {
|
|
14
14
|
"import": {
|
|
15
|
-
"types": "./dist/src/
|
|
16
|
-
"default": "./dist/src/
|
|
15
|
+
"types": "./dist/src/migrations/gamification/mcq/index.d.ts",
|
|
16
|
+
"default": "./dist/src/migrations/gamification/mcq/index.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
"./
|
|
19
|
+
"./migrations/image": {
|
|
20
20
|
"import": {
|
|
21
|
-
"types": "./dist/src/
|
|
22
|
-
"default": "./dist/src/
|
|
21
|
+
"types": "./dist/src/migrations/image/index.d.ts",
|
|
22
|
+
"default": "./dist/src/migrations/image/index.js"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
"./
|
|
25
|
+
"./migrations/medecine": {
|
|
26
26
|
"import": {
|
|
27
|
-
"types": "./dist/src/
|
|
28
|
-
"default": "./dist/src/
|
|
27
|
+
"types": "./dist/src/migrations/medecine/index.d.ts",
|
|
28
|
+
"default": "./dist/src/migrations/medecine/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"./migrations/payment": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/src/migrations/payment/index.d.ts",
|
|
34
|
+
"default": "./dist/src/migrations/payment/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"./migrations/user": {
|
|
38
|
+
"import": {
|
|
39
|
+
"types": "./dist/src/migrations/user/index.d.ts",
|
|
40
|
+
"default": "./dist/src/migrations/user/index.js"
|
|
29
41
|
}
|
|
30
42
|
},
|
|
31
|
-
"./
|
|
43
|
+
"./migrations/video": {
|
|
44
|
+
"import": {
|
|
45
|
+
"types": "./dist/src/migrations/video/index.d.ts",
|
|
46
|
+
"default": "./dist/src/migrations/video/index.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"./repositories/medecine": {
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./dist/src/repositories/medecine/index.d.ts",
|
|
52
|
+
"default": "./dist/src/repositories/medecine/index.js"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"./migrations/book": {
|
|
56
|
+
"import": {
|
|
57
|
+
"types": "./dist/src/migrations/book/index.d.ts",
|
|
58
|
+
"default": "./dist/src/migrations/book/index.js"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"./migrations/common": {
|
|
62
|
+
"import": {
|
|
63
|
+
"types": "./dist/src/migrations/common/index.d.ts",
|
|
64
|
+
"default": "./dist/src/migrations/common/index.js"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"./migrations/country": {
|
|
68
|
+
"import": {
|
|
69
|
+
"types": "./dist/src/migrations/country/index.d.ts",
|
|
70
|
+
"default": "./dist/src/migrations/country/index.js"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"./migrations/currency": {
|
|
74
|
+
"import": {
|
|
75
|
+
"types": "./dist/src/migrations/currency/index.d.ts",
|
|
76
|
+
"default": "./dist/src/migrations/currency/index.js"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"./migrations/folder": {
|
|
80
|
+
"import": {
|
|
81
|
+
"types": "./dist/src/migrations/folder/index.d.ts",
|
|
82
|
+
"default": "./dist/src/migrations/folder/index.js"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"./migrations/gamification": {
|
|
86
|
+
"import": {
|
|
87
|
+
"types": "./dist/src/migrations/gamification/index.d.ts",
|
|
88
|
+
"default": "./dist/src/migrations/gamification/index.js"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"./migrations/gamification/flashcard": {
|
|
92
|
+
"import": {
|
|
93
|
+
"types": "./dist/src/migrations/gamification/flashcard/index.d.ts",
|
|
94
|
+
"default": "./dist/src/migrations/gamification/flashcard/index.js"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"./repositories/payment": {
|
|
32
98
|
"import": {
|
|
33
99
|
"types": "./dist/src/repositories/payment/index.d.ts",
|
|
34
100
|
"default": "./dist/src/repositories/payment/index.js"
|
|
35
101
|
}
|
|
36
102
|
},
|
|
37
|
-
"./
|
|
103
|
+
"./repositories/video": {
|
|
38
104
|
"import": {
|
|
39
105
|
"types": "./dist/src/repositories/video/index.d.ts",
|
|
40
106
|
"default": "./dist/src/repositories/video/index.js"
|
|
41
107
|
}
|
|
42
108
|
},
|
|
43
|
-
"./
|
|
109
|
+
"./repositories/user": {
|
|
110
|
+
"import": {
|
|
111
|
+
"types": "./dist/src/repositories/user/index.d.ts",
|
|
112
|
+
"default": "./dist/src/repositories/user/index.js"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"./repositories/gamification": {
|
|
44
116
|
"import": {
|
|
45
117
|
"types": "./dist/src/repositories/gamification/index.d.ts",
|
|
46
118
|
"default": "./dist/src/repositories/gamification/index.js"
|
|
47
119
|
}
|
|
48
120
|
},
|
|
49
|
-
"./
|
|
121
|
+
"./repositories/gamification/flashcard": {
|
|
50
122
|
"import": {
|
|
51
123
|
"types": "./dist/src/repositories/gamification/flashcard/index.d.ts",
|
|
52
124
|
"default": "./dist/src/repositories/gamification/flashcard/index.js"
|
|
53
125
|
}
|
|
54
126
|
},
|
|
55
|
-
"./
|
|
127
|
+
"./repositories/gamification/mcq": {
|
|
56
128
|
"import": {
|
|
57
129
|
"types": "./dist/src/repositories/gamification/mcq/index.d.ts",
|
|
58
130
|
"default": "./dist/src/repositories/gamification/mcq/index.js"
|
|
59
131
|
}
|
|
60
132
|
},
|
|
61
|
-
"./
|
|
133
|
+
"./repositories/country": {
|
|
134
|
+
"import": {
|
|
135
|
+
"types": "./dist/src/repositories/country/index.d.ts",
|
|
136
|
+
"default": "./dist/src/repositories/country/index.js"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"./repositories/currency": {
|
|
140
|
+
"import": {
|
|
141
|
+
"types": "./dist/src/repositories/currency/index.d.ts",
|
|
142
|
+
"default": "./dist/src/repositories/currency/index.js"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"./entities/gamification/flashcard": {
|
|
146
|
+
"import": {
|
|
147
|
+
"types": "./dist/src/entities/gamification/flashcard/index.d.ts",
|
|
148
|
+
"default": "./dist/src/entities/gamification/flashcard/index.js"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"./entities/gamification/mcq": {
|
|
152
|
+
"import": {
|
|
153
|
+
"types": "./dist/src/entities/gamification/mcq/index.d.ts",
|
|
154
|
+
"default": "./dist/src/entities/gamification/mcq/index.js"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"./entities/country": {
|
|
158
|
+
"import": {
|
|
159
|
+
"types": "./dist/src/entities/country/index.d.ts",
|
|
160
|
+
"default": "./dist/src/entities/country/index.js"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"./entities/currency": {
|
|
164
|
+
"import": {
|
|
165
|
+
"types": "./dist/src/entities/currency/index.d.ts",
|
|
166
|
+
"default": "./dist/src/entities/currency/index.js"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"./entities/medecine": {
|
|
170
|
+
"import": {
|
|
171
|
+
"types": "./dist/src/entities/medecine/index.d.ts",
|
|
172
|
+
"default": "./dist/src/entities/medecine/index.js"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"./repositories/book": {
|
|
176
|
+
"import": {
|
|
177
|
+
"types": "./dist/src/repositories/book/index.d.ts",
|
|
178
|
+
"default": "./dist/src/repositories/book/index.js"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"./repositories/common": {
|
|
182
|
+
"import": {
|
|
183
|
+
"types": "./dist/src/repositories/common/index.d.ts",
|
|
184
|
+
"default": "./dist/src/repositories/common/index.js"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"./repositories/image": {
|
|
188
|
+
"import": {
|
|
189
|
+
"types": "./dist/src/repositories/image/index.d.ts",
|
|
190
|
+
"default": "./dist/src/repositories/image/index.js"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"./entities/book": {
|
|
62
194
|
"import": {
|
|
63
195
|
"types": "./dist/src/entities/book/index.d.ts",
|
|
64
196
|
"default": "./dist/src/entities/book/index.js"
|
|
65
197
|
}
|
|
66
198
|
},
|
|
67
|
-
"./
|
|
199
|
+
"./entities/common": {
|
|
68
200
|
"import": {
|
|
69
201
|
"types": "./dist/src/entities/common/index.d.ts",
|
|
70
202
|
"default": "./dist/src/entities/common/index.js"
|
|
71
203
|
}
|
|
72
204
|
},
|
|
73
|
-
"./
|
|
205
|
+
"./entities/folder": {
|
|
206
|
+
"import": {
|
|
207
|
+
"types": "./dist/src/entities/folder/index.d.ts",
|
|
208
|
+
"default": "./dist/src/entities/folder/index.js"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"./entities/image": {
|
|
74
212
|
"import": {
|
|
75
213
|
"types": "./dist/src/entities/image/index.d.ts",
|
|
76
214
|
"default": "./dist/src/entities/image/index.js"
|
|
77
215
|
}
|
|
78
216
|
},
|
|
79
|
-
"./
|
|
217
|
+
"./entities/payment": {
|
|
80
218
|
"import": {
|
|
81
219
|
"types": "./dist/src/entities/payment/index.d.ts",
|
|
82
220
|
"default": "./dist/src/entities/payment/index.js"
|
|
83
221
|
}
|
|
84
222
|
},
|
|
85
|
-
"./
|
|
223
|
+
"./entities/video": {
|
|
86
224
|
"import": {
|
|
87
225
|
"types": "./dist/src/entities/video/index.d.ts",
|
|
88
226
|
"default": "./dist/src/entities/video/index.js"
|
|
89
227
|
}
|
|
90
228
|
},
|
|
91
|
-
"./
|
|
92
|
-
"import": {
|
|
93
|
-
"types": "./dist/src/entities/gamification/index.d.ts",
|
|
94
|
-
"default": "./dist/src/entities/gamification/index.js"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"./src/entities/gamification/flashcard": {
|
|
98
|
-
"import": {
|
|
99
|
-
"types": "./dist/src/entities/gamification/flashcard/index.d.ts",
|
|
100
|
-
"default": "./dist/src/entities/gamification/flashcard/index.js"
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
"./src/entities/gamification/mcq": {
|
|
104
|
-
"import": {
|
|
105
|
-
"types": "./dist/src/entities/gamification/mcq/index.d.ts",
|
|
106
|
-
"default": "./dist/src/entities/gamification/mcq/index.js"
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
"./src/entities/user": {
|
|
229
|
+
"./entities/user": {
|
|
110
230
|
"import": {
|
|
111
231
|
"types": "./dist/src/entities/user/index.d.ts",
|
|
112
232
|
"default": "./dist/src/entities/user/index.js"
|
|
113
233
|
}
|
|
114
234
|
},
|
|
115
|
-
"./
|
|
235
|
+
"./entities/gamification": {
|
|
116
236
|
"import": {
|
|
117
|
-
"types": "./dist/src/
|
|
118
|
-
"default": "./dist/src/
|
|
237
|
+
"types": "./dist/src/entities/gamification/index.d.ts",
|
|
238
|
+
"default": "./dist/src/entities/gamification/index.js"
|
|
119
239
|
}
|
|
120
240
|
},
|
|
121
241
|
"./package.json": "./package.json"
|
|
@@ -124,32 +244,42 @@
|
|
|
124
244
|
"scripts": {
|
|
125
245
|
"build": "bunup",
|
|
126
246
|
"lint": "tsgo --noEmit && bunx biome lint",
|
|
127
|
-
"publish
|
|
128
|
-
"publish:pack": "bun pm pack --destination ./dist",
|
|
129
|
-
"publish:dry": "bun publish --dry-run"
|
|
247
|
+
"npm:publish": "bun publish --tolerate-republish --access public"
|
|
130
248
|
},
|
|
131
249
|
"dependencies": {
|
|
132
|
-
"@ooneex/container": "0.0.1",
|
|
133
|
-
"@ooneex/gamification": "0.0.1",
|
|
134
|
-
"@ooneex/image": "0.0.1",
|
|
135
|
-
"@ooneex/payment": "0.0.1",
|
|
136
|
-
"@ooneex/status": "0.0.1",
|
|
137
|
-
"@ooneex/user": "0.0.1",
|
|
138
|
-
"@ooneex/utils": "0.0.8",
|
|
139
|
-
"typeorm": "^0.3.27"
|
|
140
|
-
},
|
|
141
|
-
"devDependencies": {
|
|
142
250
|
"@ooneex/book": "0.0.1",
|
|
143
251
|
"@ooneex/category": "0.0.1",
|
|
144
252
|
"@ooneex/color": "0.0.1",
|
|
253
|
+
"@ooneex/container": "0.0.2",
|
|
254
|
+
"@ooneex/country": "0.0.1",
|
|
145
255
|
"@ooneex/currencies": "0.0.1",
|
|
146
256
|
"@ooneex/database": "0.0.1",
|
|
257
|
+
"@ooneex/education": "0.0.1",
|
|
147
258
|
"@ooneex/folder": "0.0.1",
|
|
259
|
+
"@ooneex/gamification": "0.0.1",
|
|
260
|
+
"@ooneex/image": "0.0.1",
|
|
261
|
+
"@ooneex/payment": "0.0.1",
|
|
262
|
+
"@ooneex/repository": "0.0.1",
|
|
148
263
|
"@ooneex/role": "0.0.1",
|
|
264
|
+
"@ooneex/status": "0.0.1",
|
|
149
265
|
"@ooneex/tag": "0.0.1",
|
|
150
266
|
"@ooneex/translation": "0.0.1",
|
|
151
267
|
"@ooneex/types": "0.0.1",
|
|
152
|
-
"@ooneex/
|
|
268
|
+
"@ooneex/user": "0.0.1",
|
|
269
|
+
"@ooneex/utils": "0.0.8",
|
|
270
|
+
"@ooneex/video": "0.0.1",
|
|
271
|
+
"typeorm": "^0.3.27"
|
|
153
272
|
},
|
|
154
|
-
"
|
|
273
|
+
"keywords": [
|
|
274
|
+
"bun",
|
|
275
|
+
"database",
|
|
276
|
+
"entities",
|
|
277
|
+
"migrations",
|
|
278
|
+
"ooneex",
|
|
279
|
+
"orm",
|
|
280
|
+
"repositories",
|
|
281
|
+
"sql",
|
|
282
|
+
"typeorm",
|
|
283
|
+
"typescript"
|
|
284
|
+
]
|
|
155
285
|
}
|
|
Binary file
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{S as r,T as l}from"./chunk-764bzjhz.js";import{V as e,X as t,Y as m}from"./chunk-j7nprmyh.js";import{IMAGE_FORMATS as i,IMAGE_MIMES as u}from"@ooneex/image";import{Column as a,Entity as o,JoinColumn as p,JoinTable as s,ManyToMany as y,ManyToOne as g}from"typeorm";class n extends m{}e([a({name:"url",type:"varchar",length:500}),t("design:type",String)],n.prototype,"url",void 0),e([a({name:"width",type:"int",nullable:!0}),t("design:type",Number)],n.prototype,"width",void 0),e([a({name:"height",type:"int",nullable:!0}),t("design:type",Number)],n.prototype,"height",void 0),e([a({name:"alt",type:"varchar",length:255,nullable:!0}),t("design:type",String)],n.prototype,"alt",void 0),e([a({name:"title",type:"varchar",length:255,nullable:!0}),t("design:type",String)],n.prototype,"title",void 0),e([a({name:"format",type:"enum",enum:i,nullable:!0}),t("design:type",typeof ImageFormatType==="undefined"?Object:ImageFormatType)],n.prototype,"format",void 0),e([a({name:"mime_type",type:"enum",enum:u,nullable:!0}),t("design:type",typeof ImageMimeType==="undefined"?Object:ImageMimeType)],n.prototype,"mimeType",void 0),e([a({name:"size",type:"bigint",nullable:!0}),t("design:type",Number)],n.prototype,"size",void 0),e([a({name:"metadata",type:"jsonb",nullable:!0}),t("design:type",typeof Record==="undefined"?Object:Record)],n.prototype,"metadata",void 0),e([a({name:"context",type:"varchar",length:255,nullable:!0}),t("design:type",String)],n.prototype,"context",void 0),e([a({name:"context_id",type:"varchar",length:25,nullable:!0}),t("design:type",String)],n.prototype,"contextId",void 0),e([g(()=>r,{nullable:!0,eager:!1,cascade:["insert","update"]}),p({name:"status_id"}),t("design:type",typeof IStatus==="undefined"?Object:IStatus)],n.prototype,"status",void 0),e([y(()=>l,{nullable:!0,eager:!1,cascade:["insert","update"]}),s({name:"images_tags",joinColumn:{name:"image_id",referencedColumnName:"id"},inverseJoinColumn:{name:"tag_id",referencedColumnName:"id"}}),t("design:type",Array)],n.prototype,"tags",void 0),n=e([o({name:"images"})],n);
|
|
3
|
-
export{n as Q};
|
|
4
|
-
|
|
5
|
-
//# debugId=64E4CAAE46A94BDF64756E2164756E21
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{V as e,X as r,Y as l}from"./chunk-j7nprmyh.js";import{Column as t,Entity as u}from"typeorm";class n extends l{}e([t({name:"hex",type:"varchar",length:7,nullable:!0}),r("design:type",typeof HexaType==="undefined"?Object:HexaType)],n.prototype,"hex",void 0),e([t({name:"rgb",type:"varchar",length:50,nullable:!0}),r("design:type",typeof RGBType==="undefined"?Object:RGBType)],n.prototype,"rgb",void 0),e([t({name:"rgba",type:"varchar",length:60,nullable:!0}),r("design:type",typeof RGBAType==="undefined"?Object:RGBAType)],n.prototype,"rgba",void 0),e([t({name:"hsl",type:"varchar",length:50,nullable:!0}),r("design:type",typeof HSLType==="undefined"?Object:HSLType)],n.prototype,"hsl",void 0),e([t({name:"hsla",type:"varchar",length:60,nullable:!0}),r("design:type",typeof HSLAType==="undefined"?Object:HSLAType)],n.prototype,"hsla",void 0),e([t({name:"alpha",type:"decimal",precision:3,scale:2,nullable:!0}),r("design:type",Number)],n.prototype,"alpha",void 0),e([t({name:"red",type:"int",nullable:!0}),r("design:type",Number)],n.prototype,"red",void 0),e([t({name:"green",type:"int",nullable:!0}),r("design:type",Number)],n.prototype,"green",void 0),e([t({name:"blue",type:"int",nullable:!0}),r("design:type",Number)],n.prototype,"blue",void 0),e([t({name:"hue",type:"int",nullable:!0}),r("design:type",Number)],n.prototype,"hue",void 0),e([t({name:"saturation",type:"int",nullable:!0}),r("design:type",Number)],n.prototype,"saturation",void 0),e([t({name:"lightness",type:"int",nullable:!0}),r("design:type",Number)],n.prototype,"lightness",void 0),n=e([u({name:"colors"})],n);import{EStatus as p}from"@ooneex/status";import{Column as a,Entity as s,JoinColumn as i,ManyToOne as y}from"typeorm";class o extends l{}e([a({name:"status",type:"enum",enum:p}),r("design:type",typeof p==="undefined"?Object:p)],o.prototype,"status",void 0),e([y(()=>n,{nullable:!0,eager:!1,cascade:["insert","update"]}),i({name:"color_id"}),r("design:type",typeof IColor==="undefined"?Object:IColor)],o.prototype,"color",void 0),e([a({name:"description",type:"text",nullable:!0}),r("design:type",String)],o.prototype,"description",void 0),e([a({name:"reason",type:"text",nullable:!0}),r("design:type",String)],o.prototype,"reason",void 0),o=e([s({name:"statuses"})],o);import{Column as b,Entity as c,JoinColumn as h,ManyToOne as g}from"typeorm";class m extends l{}e([b({name:"name",type:"varchar",length:100}),r("design:type",String)],m.prototype,"name",void 0),e([g(()=>n,{nullable:!0,eager:!1,cascade:["insert","update"]}),h({name:"color_id"}),r("design:type",typeof IColor==="undefined"?Object:IColor)],m.prototype,"color",void 0),m=e([c({name:"tags"})],m);
|
|
3
|
-
export{n as R,o as S,m as T};
|
|
4
|
-
|
|
5
|
-
//# debugId=3C5E92A82A97472D64756E2164756E21
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["src/entities/common/ColorEntity.ts", "src/entities/common/StatusEntity.ts", "src/entities/common/TagEntity.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { HexaType, HSLAType, HSLType, IColor, RGBAType, RGBType } from \"@ooneex/color\";\nimport { Column, Entity } from \"typeorm\";\nimport { BaseEntity } from \"./BaseEntity\";\n\n@Entity({\n name: \"colors\",\n})\nexport class ColorEntity extends BaseEntity implements IColor {\n @Column({ name: \"hex\", type: \"varchar\", length: 7, nullable: true })\n hex?: HexaType;\n\n @Column({ name: \"rgb\", type: \"varchar\", length: 50, nullable: true })\n rgb?: RGBType;\n\n @Column({ name: \"rgba\", type: \"varchar\", length: 60, nullable: true })\n rgba?: RGBAType;\n\n @Column({ name: \"hsl\", type: \"varchar\", length: 50, nullable: true })\n hsl?: HSLType;\n\n @Column({ name: \"hsla\", type: \"varchar\", length: 60, nullable: true })\n hsla?: HSLAType;\n\n @Column({\n name: \"alpha\",\n type: \"decimal\",\n precision: 3,\n scale: 2,\n nullable: true,\n })\n alpha?: number;\n\n @Column({ name: \"red\", type: \"int\", nullable: true })\n red?: number;\n\n @Column({ name: \"green\", type: \"int\", nullable: true })\n green?: number;\n\n @Column({ name: \"blue\", type: \"int\", nullable: true })\n blue?: number;\n\n @Column({ name: \"hue\", type: \"int\", nullable: true })\n hue?: number;\n\n @Column({ name: \"saturation\", type: \"int\", nullable: true })\n saturation?: number;\n\n @Column({ name: \"lightness\", type: \"int\", nullable: true })\n lightness?: number;\n}\n",
|
|
6
|
-
"import type { IColor } from \"@ooneex/color\";\nimport { EStatus, type IStatus } from \"@ooneex/status\";\nimport { Column, Entity, JoinColumn, ManyToOne } from \"typeorm\";\nimport { BaseEntity } from \"./BaseEntity\";\nimport { ColorEntity } from \"./ColorEntity\";\n\n@Entity({\n name: \"statuses\",\n})\nexport class StatusEntity extends BaseEntity implements IStatus {\n @Column({\n name: \"status\",\n type: \"enum\",\n enum: EStatus,\n })\n status: EStatus;\n\n @ManyToOne(() => ColorEntity, {\n nullable: true,\n eager: false,\n cascade: [\"insert\", \"update\"],\n })\n @JoinColumn({ name: \"color_id\" })\n color?: IColor;\n\n @Column({ name: \"description\", type: \"text\", nullable: true })\n description?: string;\n\n @Column({ name: \"reason\", type: \"text\", nullable: true })\n reason?: string;\n}\n",
|
|
7
|
-
"import type { IColor } from \"@ooneex/color\";\nimport type { ITag } from \"@ooneex/tag\";\nimport { Column, Entity, JoinColumn, ManyToOne } from \"typeorm\";\nimport { BaseEntity } from \"./BaseEntity\";\nimport { ColorEntity } from \"./ColorEntity\";\n\n@Entity({\n name: \"tags\",\n})\nexport class TagEntity extends BaseEntity implements ITag {\n @Column({ name: \"name\", type: \"varchar\", length: 100 })\n name: string;\n\n @ManyToOne(() => ColorEntity, {\n nullable: true,\n eager: false,\n cascade: [\"insert\", \"update\"],\n })\n @JoinColumn({ name: \"color_id\" })\n color?: IColor;\n}\n"
|
|
8
|
-
],
|
|
9
|
-
"mappings": ";sDACA,iBAAS,YAAQ,gBAMV,MAAM,UAAoB,CAA6B,CA0C9D,CAxCE,GADC,EAAO,CAAE,KAAM,MAAO,KAAM,UAAW,OAAQ,EAAG,SAAU,EAAK,CAAC,EACnE,gEAFW,EAEX,wBAGA,GADC,EAAO,CAAE,KAAM,MAAO,KAAM,UAAW,OAAQ,GAAI,SAAU,EAAK,CAAC,EACpE,8DALW,EAKX,wBAGA,GADC,EAAO,CAAE,KAAM,OAAQ,KAAM,UAAW,OAAQ,GAAI,SAAU,EAAK,CAAC,EACrE,gEARW,EAQX,yBAGA,GADC,EAAO,CAAE,KAAM,MAAO,KAAM,UAAW,OAAQ,GAAI,SAAU,EAAK,CAAC,EACpE,8DAXW,EAWX,wBAGA,GADC,EAAO,CAAE,KAAM,OAAQ,KAAM,UAAW,OAAQ,GAAI,SAAU,EAAK,CAAC,EACrE,gEAdW,EAcX,yBASA,GAPC,EAAO,CACN,KAAM,QACN,KAAM,UACN,UAAW,EACX,MAAO,EACP,SAAU,EACZ,CAAC,EACD,yBAvBW,EAuBX,0BAGA,GADC,EAAO,CAAE,KAAM,MAAO,KAAM,MAAO,SAAU,EAAK,CAAC,EACpD,yBA1BW,EA0BX,wBAGA,GADC,EAAO,CAAE,KAAM,QAAS,KAAM,MAAO,SAAU,EAAK,CAAC,EACtD,yBA7BW,EA6BX,0BAGA,GADC,EAAO,CAAE,KAAM,OAAQ,KAAM,MAAO,SAAU,EAAK,CAAC,EACrD,yBAhCW,EAgCX,yBAGA,GADC,EAAO,CAAE,KAAM,MAAO,KAAM,MAAO,SAAU,EAAK,CAAC,EACpD,yBAnCW,EAmCX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0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{C as x}from"./chunk-zmzz7hqq.js";import{Q as v}from"./chunk-2e7zbxcq.js";import{T as I}from"./chunk-764bzjhz.js";import{V as e,X as n,Y as a}from"./chunk-j7nprmyh.js";import{Column as s,Entity as J}from"typeorm";class i extends a{}e([s({name:"name",type:"varchar",length:255}),n("design:type",String)],i.prototype,"name",void 0),e([s({name:"description",type:"text",nullable:!0}),n("design:type",String)],i.prototype,"description",void 0),e([s({name:"is_enabled",type:"boolean",default:!0,nullable:!0}),n("design:type",Boolean)],i.prototype,"isEnabled",void 0),e([s({name:"limit",type:"int",nullable:!0}),n("design:type",Number)],i.prototype,"limit",void 0),i=e([J({name:"payment_features"})],i);import{ESubscriptionPeriod as g}from"@ooneex/payment";import{Column as r,Entity as j,JoinTable as A,ManyToMany as M}from"typeorm";class m extends a{}e([r({name:"name",type:"varchar",length:255}),n("design:type",String)],m.prototype,"name",void 0),e([r({name:"description",type:"text",nullable:!0}),n("design:type",String)],m.prototype,"description",void 0),e([r({name:"currency",type:"varchar",length:3}),n("design:type",typeof CurrencyCodeType==="undefined"?Object:CurrencyCodeType)],m.prototype,"currency",void 0),e([r({name:"price",type:"decimal",precision:10,scale:2}),n("design:type",Number)],m.prototype,"price",void 0),e([r({name:"period",type:"enum",enum:g}),n("design:type",typeof g==="undefined"?Object:g)],m.prototype,"period",void 0),e([r({name:"period_count",type:"int",default:1,nullable:!0}),n("design:type",Number)],m.prototype,"periodCount",void 0),e([M(()=>i,{nullable:!0,eager:!1,cascade:["insert","update"]}),A({name:"payment_plans_features",joinColumn:{name:"plan_id",referencedColumnName:"id"},inverseJoinColumn:{name:"feature_id",referencedColumnName:"id"}}),n("design:type",Array)],m.prototype,"features",void 0),e([r({name:"is_active",type:"boolean",default:!0,nullable:!0}),n("design:type",Boolean)],m.prototype,"isActive",void 0),e([r({name:"trial_days",type:"int",default:0,nullable:!0}),n("design:type",Number)],m.prototype,"trialDays",void 0),m=e([j({name:"payment_plans"})],m);import{Column as o,Entity as B,JoinTable as y,ManyToMany as f}from"typeorm";class l extends a{}e([o({name:"name",type:"varchar",length:255}),n("design:type",String)],l.prototype,"name",void 0),e([o({name:"description",type:"text",nullable:!0}),n("design:type",String)],l.prototype,"description",void 0),e([f(()=>x,{nullable:!0,eager:!1,cascade:["insert","update"]}),y({name:"payment_products_categories",joinColumn:{name:"product_id",referencedColumnName:"id"},inverseJoinColumn:{name:"category_id",referencedColumnName:"id"}}),n("design:type",Array)],l.prototype,"categories",void 0),e([o({name:"currency",type:"varchar",length:3}),n("design:type",typeof CurrencyCodeType==="undefined"?Object:CurrencyCodeType)],l.prototype,"currency",void 0),e([o({name:"price",type:"decimal",precision:10,scale:2}),n("design:type",Number)],l.prototype,"price",void 0),e([o({name:"barcode",type:"varchar",length:255,nullable:!0}),n("design:type",String)],l.prototype,"barcode",void 0),e([f(()=>v,{nullable:!0,eager:!1,cascade:["insert","update"]}),y({name:"payment_products_images",joinColumn:{name:"product_id",referencedColumnName:"id"},inverseJoinColumn:{name:"image_id",referencedColumnName:"id"}}),n("design:type",Array)],l.prototype,"images",void 0),e([o({name:"attributes",type:"jsonb",nullable:!0}),n("design:type",typeof Record==="undefined"?Object:Record)],l.prototype,"attributes",void 0),e([f(()=>I,{nullable:!0,eager:!1,cascade:["insert","update"]}),y({name:"payment_products_tags",joinColumn:{name:"product_id",referencedColumnName:"id"},inverseJoinColumn:{name:"tag_id",referencedColumnName:"id"}}),n("design:type",Array)],l.prototype,"tags",void 0),l=e([B({name:"payment_products"})],l);import{EDiscountType as T}from"@ooneex/payment";import{Column as t,Entity as D,JoinTable as h,ManyToMany as N}from"typeorm";class u extends a{}e([t({name:"code",type:"varchar",length:50,unique:!0}),n("design:type",String)],u.prototype,"code",void 0),e([t({name:"name",type:"varchar",length:255,nullable:!0}),n("design:type",String)],u.prototype,"name",void 0),e([t({name:"description",type:"text",nullable:!0}),n("design:type",String)],u.prototype,"description",void 0),e([t({name:"discount_type",type:"enum",enum:T}),n("design:type",typeof T==="undefined"?Object:T)],u.prototype,"discountType",void 0),e([t({name:"discount_value",type:"decimal",precision:10,scale:2}),n("design:type",Number)],u.prototype,"discountValue",void 0),e([t({name:"currency",type:"varchar",length:3,nullable:!0}),n("design:type",typeof CurrencyCodeType==="undefined"?Object:CurrencyCodeType)],u.prototype,"currency",void 0),e([t({name:"max_uses",type:"int",nullable:!0}),n("design:type",Number)],u.prototype,"maxUses",void 0),e([t({name:"used_count",type:"int",default:0,nullable:!0}),n("design:type",Number)],u.prototype,"usedCount",void 0),e([t({name:"start_at",type:"timestamptz",nullable:!0}),n("design:type",typeof Date==="undefined"?Object:Date)],u.prototype,"startAt",void 0),e([t({name:"end_at",type:"timestamptz",nullable:!0}),n("design:type",typeof Date==="undefined"?Object:Date)],u.prototype,"endAt",void 0),e([t({name:"is_active",type:"boolean",default:!0,nullable:!0}),n("design:type",Boolean)],u.prototype,"isActive",void 0),e([t({name:"minimum_amount",type:"decimal",precision:10,scale:2,nullable:!0}),n("design:type",Number)],u.prototype,"minimumAmount",void 0),e([N(()=>l,{nullable:!0,eager:!1,cascade:["insert","update"]}),h({name:"payment_coupons_applicable_products",joinColumn:{name:"coupon_id",referencedColumnName:"id"},inverseJoinColumn:{name:"product_id",referencedColumnName:"id"}}),n("design:type",Array)],u.prototype,"applicableProducts",void 0),e([N(()=>m,{nullable:!0,eager:!1,cascade:["insert","update"]}),h({name:"payment_coupons_applicable_plans",joinColumn:{name:"coupon_id",referencedColumnName:"id"},inverseJoinColumn:{name:"plan_id",referencedColumnName:"id"}}),n("design:type",Array)],u.prototype,"applicablePlans",void 0),u=e([D({name:"payment_coupons"})],u);import{Column as c,Entity as z}from"typeorm";class p extends a{}e([c({name:"balance",type:"decimal",precision:10,scale:2}),n("design:type",Number)],p.prototype,"balance",void 0),e([c({name:"currency",type:"varchar",length:3,nullable:!0}),n("design:type",typeof CurrencyCodeType==="undefined"?Object:CurrencyCodeType)],p.prototype,"currency",void 0),e([c({name:"expires_at",type:"timestamptz",nullable:!0}),n("design:type",typeof Date==="undefined"?Object:Date)],p.prototype,"expiresAt",void 0),e([c({name:"description",type:"text",nullable:!0}),n("design:type",String)],p.prototype,"description",void 0),p=e([z({name:"payment_credits"})],p);import{Column as d,Entity as E,JoinTable as b,ManyToMany as C}from"typeorm";class _ extends a{}e([C(()=>u,{nullable:!0,eager:!1,cascade:["insert","update"]}),b({name:"payment_subscriptions_coupons",joinColumn:{name:"subscription_id",referencedColumnName:"id"},inverseJoinColumn:{name:"coupon_id",referencedColumnName:"id"}}),n("design:type",Array)],_.prototype,"coupons",void 0),e([C(()=>m,{nullable:!0,eager:!1,cascade:["insert","update"]}),b({name:"payment_subscriptions_plans",joinColumn:{name:"subscription_id",referencedColumnName:"id"},inverseJoinColumn:{name:"plan_id",referencedColumnName:"id"}}),n("design:type",Array)],_.prototype,"plans",void 0),e([C(()=>p,{nullable:!0,eager:!1,cascade:["insert","update"]}),b({name:"payment_subscriptions_credits",joinColumn:{name:"subscription_id",referencedColumnName:"id"},inverseJoinColumn:{name:"credit_id",referencedColumnName:"id"}}),n("design:type",Array)],_.prototype,"credits",void 0),e([d({name:"start_at",type:"timestamptz"}),n("design:type",typeof Date==="undefined"?Object:Date)],_.prototype,"startAt",void 0),e([d({name:"end_at",type:"timestamptz",nullable:!0}),n("design:type",typeof Date==="undefined"?Object:Date)],_.prototype,"endAt",void 0),e([d({name:"is_trial",type:"boolean",default:!1,nullable:!0}),n("design:type",Boolean)],_.prototype,"isTrial",void 0),e([d({name:"is_active",type:"boolean",default:!0,nullable:!0}),n("design:type",Boolean)],_.prototype,"isActive",void 0),_=e([E({name:"payment_subscriptions"})],_);
|
|
3
|
-
export{i as t,m as u,l as v,u as w,p as x,_ as y};
|
|
4
|
-
|
|
5
|
-
//# debugId=822777824254200564756E2164756E21
|