@ooneex/typeorm 0.0.1 → 0.3.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.
Files changed (178) hide show
  1. package/dist/shared/chunk-1ez1q8rj.js +5 -0
  2. package/dist/shared/chunk-1ez1q8rj.js.map +10 -0
  3. package/dist/shared/chunk-23739ja5.js +5 -0
  4. package/dist/shared/{chunk-pwhygf44.js.map → chunk-23739ja5.js.map} +2 -2
  5. package/dist/shared/chunk-3s989zjv.js +5 -0
  6. package/dist/shared/{chunk-eh420jqn.js.map → chunk-3s989zjv.js.map} +2 -2
  7. package/dist/shared/chunk-4ysz6b7v.js +5 -0
  8. package/dist/shared/chunk-4ysz6b7v.js.map +10 -0
  9. package/dist/shared/chunk-635xd7h1.js +5 -0
  10. package/dist/shared/{chunk-wmftwzcs.js.map → chunk-635xd7h1.js.map} +2 -2
  11. package/dist/shared/chunk-63wp98dt.js +101 -0
  12. package/dist/shared/chunk-63wp98dt.js.map +11 -0
  13. package/dist/shared/chunk-6gzanxfz.js +5 -0
  14. package/dist/shared/chunk-6gzanxfz.js.map +18 -0
  15. package/dist/shared/chunk-81xh5hbk.js +5 -0
  16. package/dist/shared/chunk-81xh5hbk.js.map +21 -0
  17. package/dist/shared/chunk-8q6vs955.js +5 -0
  18. package/dist/shared/chunk-8q6vs955.js.map +10 -0
  19. package/dist/shared/chunk-bdyby4d8.js +5 -0
  20. package/dist/shared/chunk-bdyby4d8.js.map +10 -0
  21. package/dist/shared/chunk-fjtw26pp.js +5 -0
  22. package/dist/shared/{chunk-j7nprmyh.js.map → chunk-fjtw26pp.js.map} +2 -2
  23. package/dist/shared/chunk-gcch857j.js +5 -0
  24. package/dist/shared/chunk-gcch857j.js.map +11 -0
  25. package/dist/shared/chunk-h5mdrgqp.js +5 -0
  26. package/dist/shared/chunk-h5mdrgqp.js.map +21 -0
  27. package/dist/shared/chunk-mwb9mvew.js +42 -0
  28. package/dist/shared/chunk-mwb9mvew.js.map +10 -0
  29. package/dist/shared/chunk-n5dqa3qy.js +36 -0
  30. package/dist/shared/chunk-n5dqa3qy.js.map +10 -0
  31. package/dist/shared/chunk-qqvx08b4.js +5 -0
  32. package/dist/shared/{chunk-2e7zbxcq.js.map → chunk-qqvx08b4.js.map} +2 -2
  33. package/dist/shared/chunk-r7q1mkar.js +82 -0
  34. package/dist/shared/chunk-r7q1mkar.js.map +10 -0
  35. package/dist/shared/chunk-s1yxjjz5.js +5 -0
  36. package/dist/shared/chunk-s1yxjjz5.js.map +21 -0
  37. package/dist/shared/chunk-sm3brprk.js +51 -0
  38. package/dist/shared/chunk-sm3brprk.js.map +10 -0
  39. package/dist/shared/chunk-wp8mt34q.js +5 -0
  40. package/dist/shared/chunk-wp8mt34q.js.map +12 -0
  41. package/dist/shared/chunk-x9h6vngs.js +5 -0
  42. package/dist/shared/chunk-x9h6vngs.js.map +9 -0
  43. package/dist/shared/chunk-xyq6sfz0.js +5 -0
  44. package/dist/shared/{chunk-zmzz7hqq.js.map → chunk-xyq6sfz0.js.map} +2 -2
  45. package/dist/shared/chunk-yq9g4gac.js +5 -0
  46. package/dist/shared/{chunk-wawk30n1.js.map → chunk-yq9g4gac.js.map} +9 -4
  47. package/dist/src/entities/book/index.d.ts +80 -3
  48. package/dist/src/entities/book/index.js +2 -2
  49. package/dist/src/entities/book/index.js.map +1 -1
  50. package/dist/src/entities/common/index.d.ts +21 -28
  51. package/dist/src/entities/common/index.js +2 -2
  52. package/dist/src/entities/common/index.js.map +1 -1
  53. package/dist/src/entities/country/index.d.ts +21 -0
  54. package/dist/src/entities/country/index.js +4 -0
  55. package/dist/src/entities/country/index.js.map +9 -0
  56. package/dist/src/entities/currency/index.d.ts +23 -0
  57. package/dist/src/entities/currency/index.js +4 -0
  58. package/dist/src/entities/currency/index.js.map +9 -0
  59. package/dist/src/entities/folder/index.d.ts +104 -0
  60. package/dist/src/entities/folder/index.js +4 -0
  61. package/dist/src/entities/folder/index.js.map +19 -0
  62. package/dist/src/entities/gamification/flashcard/index.js +2 -2
  63. package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
  64. package/dist/src/entities/gamification/index.js +2 -2
  65. package/dist/src/entities/gamification/index.js.map +1 -1
  66. package/dist/src/entities/gamification/mcq/index.d.ts +76 -7
  67. package/dist/src/entities/gamification/mcq/index.js +2 -2
  68. package/dist/src/entities/gamification/mcq/index.js.map +1 -1
  69. package/dist/src/entities/image/index.d.ts +83 -6
  70. package/dist/src/entities/image/index.js +2 -2
  71. package/dist/src/entities/image/index.js.map +1 -1
  72. package/dist/src/entities/medecine/index.d.ts +36 -0
  73. package/dist/src/entities/medecine/index.js +4 -0
  74. package/dist/src/entities/medecine/index.js.map +9 -0
  75. package/dist/src/entities/payment/index.js +2 -2
  76. package/dist/src/entities/payment/index.js.map +1 -1
  77. package/dist/src/entities/user/index.d.ts +48 -7
  78. package/dist/src/entities/user/index.js +2 -2
  79. package/dist/src/entities/user/index.js.map +1 -1
  80. package/dist/src/entities/video/index.d.ts +88 -10
  81. package/dist/src/entities/video/index.js +2 -2
  82. package/dist/src/entities/video/index.js.map +1 -1
  83. package/dist/src/migrations/book/index.d.ts +97 -0
  84. package/dist/src/migrations/book/index.js +516 -0
  85. package/dist/src/migrations/book/index.js.map +21 -0
  86. package/dist/src/migrations/common/index.d.ts +41 -0
  87. package/dist/src/migrations/common/index.js +57 -0
  88. package/dist/src/migrations/common/index.js.map +10 -0
  89. package/dist/src/migrations/country/index.d.ts +9 -0
  90. package/dist/src/migrations/country/index.js +40 -0
  91. package/dist/src/migrations/country/index.js.map +10 -0
  92. package/dist/src/migrations/currency/index.d.ts +9 -0
  93. package/dist/src/migrations/currency/index.js +44 -0
  94. package/dist/src/migrations/currency/index.js.map +10 -0
  95. package/dist/src/migrations/folder/index.d.ts +81 -0
  96. package/dist/src/migrations/folder/index.js +387 -0
  97. package/dist/src/migrations/folder/index.js.map +19 -0
  98. package/dist/src/migrations/gamification/flashcard/index.d.ts +57 -0
  99. package/dist/src/migrations/gamification/flashcard/index.js +420 -0
  100. package/dist/src/migrations/gamification/flashcard/index.js.map +16 -0
  101. package/dist/src/migrations/gamification/index.d.ts +9 -0
  102. package/dist/src/migrations/gamification/index.js +4 -0
  103. package/dist/src/migrations/gamification/index.js.map +9 -0
  104. package/dist/src/migrations/gamification/mcq/index.d.ts +97 -0
  105. package/dist/src/migrations/gamification/mcq/index.js +526 -0
  106. package/dist/src/migrations/gamification/mcq/index.js.map +21 -0
  107. package/dist/src/migrations/image/index.d.ts +81 -0
  108. package/dist/src/migrations/image/index.js +328 -0
  109. package/dist/src/migrations/image/index.js.map +18 -0
  110. package/dist/src/migrations/medecine/index.d.ts +25 -0
  111. package/dist/src/migrations/medecine/index.js +119 -0
  112. package/dist/src/migrations/medecine/index.js.map +12 -0
  113. package/dist/src/migrations/payment/index.d.ts +49 -0
  114. package/dist/src/migrations/payment/index.js +352 -0
  115. package/dist/src/migrations/payment/index.js.map +15 -0
  116. package/dist/src/migrations/user/index.d.ts +81 -0
  117. package/dist/src/migrations/user/index.js +309 -0
  118. package/dist/src/migrations/user/index.js.map +19 -0
  119. package/dist/src/migrations/video/index.d.ts +97 -0
  120. package/dist/src/migrations/video/index.js +289 -0
  121. package/dist/src/migrations/video/index.js.map +21 -0
  122. package/dist/src/repositories/book/index.d.ts +310 -35
  123. package/dist/src/repositories/book/index.js +2 -2
  124. package/dist/src/repositories/book/index.js.map +15 -6
  125. package/dist/src/repositories/common/index.d.ts +65 -94
  126. package/dist/src/repositories/common/index.js +2 -2
  127. package/dist/src/repositories/common/index.js.map +8 -9
  128. package/dist/src/repositories/country/index.d.ts +42 -0
  129. package/dist/src/repositories/country/index.js +4 -0
  130. package/dist/src/repositories/country/index.js.map +10 -0
  131. package/dist/src/repositories/currency/index.d.ts +44 -0
  132. package/dist/src/repositories/currency/index.js +4 -0
  133. package/dist/src/repositories/currency/index.js.map +10 -0
  134. package/dist/src/repositories/gamification/flashcard/index.d.ts +14 -14
  135. package/dist/src/repositories/gamification/flashcard/index.js +2 -2
  136. package/dist/src/repositories/gamification/flashcard/index.js.map +9 -9
  137. package/dist/src/repositories/gamification/index.d.ts +328 -83
  138. package/dist/src/repositories/gamification/index.js +2 -2
  139. package/dist/src/repositories/gamification/index.js.map +3 -3
  140. package/dist/src/repositories/gamification/mcq/index.d.ts +299 -54
  141. package/dist/src/repositories/gamification/mcq/index.js +2 -2
  142. package/dist/src/repositories/gamification/mcq/index.js.map +15 -7
  143. package/dist/src/repositories/image/index.d.ts +295 -20
  144. package/dist/src/repositories/image/index.js +2 -2
  145. package/dist/src/repositories/image/index.js.map +13 -4
  146. package/dist/src/repositories/medecine/index.d.ts +99 -0
  147. package/dist/src/repositories/medecine/index.js +4 -0
  148. package/dist/src/repositories/medecine/index.js.map +12 -0
  149. package/dist/src/repositories/payment/index.d.ts +12 -12
  150. package/dist/src/repositories/payment/index.js +2 -2
  151. package/dist/src/repositories/payment/index.js.map +8 -8
  152. package/dist/src/repositories/user/index.d.ts +210 -59
  153. package/dist/src/repositories/user/index.js +2 -2
  154. package/dist/src/repositories/user/index.js.map +13 -8
  155. package/dist/src/repositories/video/index.d.ts +330 -54
  156. package/dist/src/repositories/video/index.js +2 -2
  157. package/dist/src/repositories/video/index.js.map +15 -6
  158. package/package.json +188 -58
  159. package/dist/ooneex-typeorm-0.0.1.tgz +0 -0
  160. package/dist/shared/chunk-2e7zbxcq.js +0 -5
  161. package/dist/shared/chunk-764bzjhz.js +0 -5
  162. package/dist/shared/chunk-764bzjhz.js.map +0 -12
  163. package/dist/shared/chunk-eh420jqn.js +0 -5
  164. package/dist/shared/chunk-gjsgnzaq.js +0 -5
  165. package/dist/shared/chunk-gjsgnzaq.js.map +0 -10
  166. package/dist/shared/chunk-hw4vdg6q.js +0 -5
  167. package/dist/shared/chunk-hw4vdg6q.js.map +0 -10
  168. package/dist/shared/chunk-j7nprmyh.js +0 -5
  169. package/dist/shared/chunk-kgxsdeye.js +0 -5
  170. package/dist/shared/chunk-kgxsdeye.js.map +0 -13
  171. package/dist/shared/chunk-ntrrrvwt.js +0 -5
  172. package/dist/shared/chunk-ntrrrvwt.js.map +0 -12
  173. package/dist/shared/chunk-pwhygf44.js +0 -5
  174. package/dist/shared/chunk-sd6mmec6.js +0 -5
  175. package/dist/shared/chunk-sd6mmec6.js.map +0 -12
  176. package/dist/shared/chunk-wawk30n1.js +0 -5
  177. package/dist/shared/chunk-wmftwzcs.js +0 -5
  178. package/dist/shared/chunk-zmzz7hqq.js +0 -5
@@ -1,13 +1,21 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["src/repositories/gamification/mcq/McqQuestionChoiceRepository.ts", "src/repositories/gamification/mcq/McqQuestionRepository.ts", "src/repositories/gamification/mcq/McqSessionQuestionRepository.ts", "src/repositories/gamification/mcq/McqSessionRepository.ts"],
3
+ "sources": ["src/repositories/gamification/mcq/McqQuestionChoiceRepository.ts", "src/repositories/gamification/mcq/McqQuestionCommentRepository.ts", "src/repositories/gamification/mcq/McqQuestionDislikedRepository.ts", "src/repositories/gamification/mcq/McqQuestionLikedRepository.ts", "src/repositories/gamification/mcq/McqQuestionReportRepository.ts", "src/repositories/gamification/mcq/McqQuestionRepository.ts", "src/repositories/gamification/mcq/McqQuestionSavedRepository.ts", "src/repositories/gamification/mcq/McqQuestionSharedRepository.ts", "src/repositories/gamification/mcq/McqQuestionStatRepository.ts", "src/repositories/gamification/mcq/McqQuestionViewedRepository.ts", "src/repositories/gamification/mcq/McqSessionQuestionRepository.ts", "src/repositories/gamification/mcq/McqSessionRepository.ts"],
4
4
  "sourcesContent": [
5
- "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabaseAdapter } from \"@ooneex/database\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { McqQuestionChoiceEntity } from \"../../../entities/gamification/mcq/McqQuestionChoiceEntity\";\n\nexport class McqQuestionChoiceRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabaseAdapter,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionChoiceEntity>> {\n return await this.database.open(McqQuestionChoiceEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionChoiceEntity> & { page?: number; limit?: number },\n ): Promise<FilterResultType<McqQuestionChoiceEntity>> {\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<McqQuestionChoiceEntity | 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<McqQuestionChoiceEntity>): Promise<McqQuestionChoiceEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async findByQuestion(questionId: string): Promise<McqQuestionChoiceEntity[]> {\n const repository = await this.open();\n\n return await repository.find({\n where: { question: { id: questionId } },\n order: { letter: \"ASC\" },\n });\n }\n\n public async findCorrectChoicesByQuestion(questionId: string): Promise<McqQuestionChoiceEntity[]> {\n const repository = await this.open();\n\n return await repository.find({\n where: {\n question: { id: questionId },\n isCorrect: true,\n },\n order: { letter: \"ASC\" },\n });\n }\n\n public async create(entity: McqQuestionChoiceEntity, options?: SaveOptions): Promise<McqQuestionChoiceEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionChoiceEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionChoiceEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionChoiceEntity, options?: SaveOptions): Promise<McqQuestionChoiceEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionChoiceEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionChoiceEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionChoiceEntity> | FindOptionsWhere<McqQuestionChoiceEntity>[],\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<McqQuestionChoiceEntity> | FindOptionsWhere<McqQuestionChoiceEntity>[],\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 { ITypeormDatabaseAdapter } from \"@ooneex/database\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { McqQuestionEntity } from \"../../../entities/gamification/mcq/McqQuestionEntity\";\n\nexport class McqQuestionRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabaseAdapter,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionEntity>> {\n return await this.database.open(McqQuestionEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionEntity>> {\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 question text search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n text: ILike(`%${q}%`),\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including text search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n text: ILike(`%${q}%`),\n };\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<McqQuestionEntity | 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<McqQuestionEntity>): Promise<McqQuestionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionEntity, options?: SaveOptions): Promise<McqQuestionEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: McqQuestionEntity[], options?: SaveOptions): Promise<McqQuestionEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionEntity, options?: SaveOptions): Promise<McqQuestionEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: McqQuestionEntity[], options?: SaveOptions): Promise<McqQuestionEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionEntity> | FindOptionsWhere<McqQuestionEntity>[],\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<McqQuestionEntity> | FindOptionsWhere<McqQuestionEntity>[],\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 { ITypeormDatabaseAdapter } from \"@ooneex/database\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { McqSessionQuestionEntity } from \"../../../entities/gamification/mcq/McqSessionQuestionEntity\";\n\nexport class McqSessionQuestionRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabaseAdapter,\n ) {}\n\n public async open(): Promise<Repository<McqSessionQuestionEntity>> {\n return await this.database.open(McqSessionQuestionEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqSessionQuestionEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqSessionQuestionEntity>> {\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 question text search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n question: {\n text: ILike(`%${q}%`),\n },\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including question text search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n question: {\n text: ILike(`%${q}%`),\n },\n };\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<McqSessionQuestionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(\n criteria: FindOptionsWhere<McqSessionQuestionEntity>,\n ): Promise<McqSessionQuestionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqSessionQuestionEntity, options?: SaveOptions): Promise<McqSessionQuestionEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqSessionQuestionEntity[],\n options?: SaveOptions,\n ): Promise<McqSessionQuestionEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqSessionQuestionEntity, options?: SaveOptions): Promise<McqSessionQuestionEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqSessionQuestionEntity[],\n options?: SaveOptions,\n ): Promise<McqSessionQuestionEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqSessionQuestionEntity> | FindOptionsWhere<McqSessionQuestionEntity>[],\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<McqSessionQuestionEntity> | FindOptionsWhere<McqSessionQuestionEntity>[],\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 { ITypeormDatabaseAdapter } from \"@ooneex/database\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { McqSessionEntity } from \"../../../entities/gamification/mcq/McqSessionEntity\";\n\nexport class McqSessionRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabaseAdapter,\n ) {}\n\n public async open(): Promise<Repository<McqSessionEntity>> {\n return await this.database.open(McqSessionEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqSessionEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqSessionEntity>> {\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 session name search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n name: ILike(`%${q}%`),\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including name search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n name: ILike(`%${q}%`),\n };\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<McqSessionEntity | 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<McqSessionEntity>): Promise<McqSessionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqSessionEntity, options?: SaveOptions): Promise<McqSessionEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: McqSessionEntity[], options?: SaveOptions): Promise<McqSessionEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqSessionEntity, options?: SaveOptions): Promise<McqSessionEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: McqSessionEntity[], options?: SaveOptions): Promise<McqSessionEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqSessionEntity> | FindOptionsWhere<McqSessionEntity>[],\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<McqSessionEntity> | FindOptionsWhere<McqSessionEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n"
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 { McqQuestionChoiceEntity } from \"../../../entities/gamification/mcq/McqQuestionChoiceEntity\";\n\n@decorator.repository()\nexport class McqQuestionChoiceRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionChoiceEntity>> {\n return await this.database.open(McqQuestionChoiceEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionChoiceEntity> & { page?: number; limit?: number },\n ): Promise<FilterResultType<McqQuestionChoiceEntity>> {\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<McqQuestionChoiceEntity | 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<McqQuestionChoiceEntity>): Promise<McqQuestionChoiceEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async findByQuestion(questionId: string): Promise<McqQuestionChoiceEntity[]> {\n const repository = await this.open();\n\n return await repository.find({\n where: { question: { id: questionId } },\n order: { letter: \"ASC\" },\n });\n }\n\n public async findCorrectChoicesByQuestion(questionId: string): Promise<McqQuestionChoiceEntity[]> {\n const repository = await this.open();\n\n return await repository.find({\n where: {\n question: { id: questionId },\n isCorrect: true,\n },\n order: { letter: \"ASC\" },\n });\n }\n\n public async create(entity: McqQuestionChoiceEntity, options?: SaveOptions): Promise<McqQuestionChoiceEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionChoiceEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionChoiceEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionChoiceEntity, options?: SaveOptions): Promise<McqQuestionChoiceEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionChoiceEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionChoiceEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionChoiceEntity> | FindOptionsWhere<McqQuestionChoiceEntity>[],\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<McqQuestionChoiceEntity> | FindOptionsWhere<McqQuestionChoiceEntity>[],\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 { McqQuestionCommentEntity } from \"../../../entities/gamification/mcq/McqQuestionCommentEntity\";\n\n@decorator.repository()\nexport class McqQuestionCommentRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionCommentEntity>> {\n return await this.database.open(McqQuestionCommentEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionCommentEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionCommentEntity>> {\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<McqQuestionCommentEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(\n criteria: FindOptionsWhere<McqQuestionCommentEntity>,\n ): Promise<McqQuestionCommentEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionCommentEntity, options?: SaveOptions): Promise<McqQuestionCommentEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionCommentEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionCommentEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionCommentEntity, options?: SaveOptions): Promise<McqQuestionCommentEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionCommentEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionCommentEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionCommentEntity> | FindOptionsWhere<McqQuestionCommentEntity>[],\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<McqQuestionCommentEntity> | FindOptionsWhere<McqQuestionCommentEntity>[],\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 { McqQuestionDislikedEntity } from \"../../../entities/gamification/mcq/McqQuestionDislikedEntity\";\n\n@decorator.repository()\nexport class McqQuestionDislikedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionDislikedEntity>> {\n return await this.database.open(McqQuestionDislikedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionDislikedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionDislikedEntity>> {\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<McqQuestionDislikedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(\n criteria: FindOptionsWhere<McqQuestionDislikedEntity>,\n ): Promise<McqQuestionDislikedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionDislikedEntity, options?: SaveOptions): Promise<McqQuestionDislikedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionDislikedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionDislikedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionDislikedEntity, options?: SaveOptions): Promise<McqQuestionDislikedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionDislikedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionDislikedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionDislikedEntity> | FindOptionsWhere<McqQuestionDislikedEntity>[],\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<McqQuestionDislikedEntity> | FindOptionsWhere<McqQuestionDislikedEntity>[],\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 { McqQuestionLikedEntity } from \"../../../entities/gamification/mcq/McqQuestionLikedEntity\";\n\n@decorator.repository()\nexport class McqQuestionLikedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionLikedEntity>> {\n return await this.database.open(McqQuestionLikedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionLikedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionLikedEntity>> {\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<McqQuestionLikedEntity | 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<McqQuestionLikedEntity>): Promise<McqQuestionLikedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionLikedEntity, options?: SaveOptions): Promise<McqQuestionLikedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionLikedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionLikedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionLikedEntity, options?: SaveOptions): Promise<McqQuestionLikedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionLikedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionLikedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionLikedEntity> | FindOptionsWhere<McqQuestionLikedEntity>[],\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<McqQuestionLikedEntity> | FindOptionsWhere<McqQuestionLikedEntity>[],\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 { McqQuestionReportEntity } from \"../../../entities/gamification/mcq/McqQuestionReportEntity\";\n\n@decorator.repository()\nexport class McqQuestionReportRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionReportEntity>> {\n return await this.database.open(McqQuestionReportEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionReportEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionReportEntity>> {\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<McqQuestionReportEntity | 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<McqQuestionReportEntity>): Promise<McqQuestionReportEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionReportEntity, options?: SaveOptions): Promise<McqQuestionReportEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionReportEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionReportEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionReportEntity, options?: SaveOptions): Promise<McqQuestionReportEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionReportEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionReportEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionReportEntity> | FindOptionsWhere<McqQuestionReportEntity>[],\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<McqQuestionReportEntity> | FindOptionsWhere<McqQuestionReportEntity>[],\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 { ILike } from \"typeorm\";\nimport { McqQuestionEntity } from \"../../../entities/gamification/mcq/McqQuestionEntity\";\n\n@decorator.repository()\nexport class McqQuestionRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionEntity>> {\n return await this.database.open(McqQuestionEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionEntity>> {\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 question text search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n text: ILike(`%${q}%`),\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including text search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n text: ILike(`%${q}%`),\n };\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<McqQuestionEntity | 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<McqQuestionEntity>): Promise<McqQuestionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionEntity, options?: SaveOptions): Promise<McqQuestionEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: McqQuestionEntity[], options?: SaveOptions): Promise<McqQuestionEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionEntity, options?: SaveOptions): Promise<McqQuestionEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: McqQuestionEntity[], options?: SaveOptions): Promise<McqQuestionEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionEntity> | FindOptionsWhere<McqQuestionEntity>[],\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<McqQuestionEntity> | FindOptionsWhere<McqQuestionEntity>[],\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 { McqQuestionSavedEntity } from \"../../../entities/gamification/mcq/McqQuestionSavedEntity\";\n\n@decorator.repository()\nexport class McqQuestionSavedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionSavedEntity>> {\n return await this.database.open(McqQuestionSavedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionSavedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionSavedEntity>> {\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<McqQuestionSavedEntity | 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<McqQuestionSavedEntity>): Promise<McqQuestionSavedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionSavedEntity, options?: SaveOptions): Promise<McqQuestionSavedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionSavedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionSavedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionSavedEntity, options?: SaveOptions): Promise<McqQuestionSavedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionSavedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionSavedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionSavedEntity> | FindOptionsWhere<McqQuestionSavedEntity>[],\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<McqQuestionSavedEntity> | FindOptionsWhere<McqQuestionSavedEntity>[],\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 { McqQuestionSharedEntity } from \"../../../entities/gamification/mcq/McqQuestionSharedEntity\";\n\n@decorator.repository()\nexport class McqQuestionSharedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionSharedEntity>> {\n return await this.database.open(McqQuestionSharedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionSharedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionSharedEntity>> {\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<McqQuestionSharedEntity | 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<McqQuestionSharedEntity>): Promise<McqQuestionSharedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionSharedEntity, options?: SaveOptions): Promise<McqQuestionSharedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionSharedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionSharedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionSharedEntity, options?: SaveOptions): Promise<McqQuestionSharedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionSharedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionSharedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionSharedEntity> | FindOptionsWhere<McqQuestionSharedEntity>[],\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<McqQuestionSharedEntity> | FindOptionsWhere<McqQuestionSharedEntity>[],\n ): 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 { McqQuestionStatEntity } from \"../../../entities/gamification/mcq/McqQuestionStatEntity\";\n\n@decorator.repository()\nexport class McqQuestionStatRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionStatEntity>> {\n return await this.database.open(McqQuestionStatEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionStatEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionStatEntity>> {\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<McqQuestionStatEntity | 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<McqQuestionStatEntity>): Promise<McqQuestionStatEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionStatEntity, options?: SaveOptions): Promise<McqQuestionStatEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: McqQuestionStatEntity[], options?: SaveOptions): Promise<McqQuestionStatEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionStatEntity, options?: SaveOptions): Promise<McqQuestionStatEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: McqQuestionStatEntity[], options?: SaveOptions): Promise<McqQuestionStatEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionStatEntity> | FindOptionsWhere<McqQuestionStatEntity>[],\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<McqQuestionStatEntity> | FindOptionsWhere<McqQuestionStatEntity>[],\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 { McqQuestionViewedEntity } from \"../../../entities/gamification/mcq/McqQuestionViewedEntity\";\n\n@decorator.repository()\nexport class McqQuestionViewedRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqQuestionViewedEntity>> {\n return await this.database.open(McqQuestionViewedEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqQuestionViewedEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqQuestionViewedEntity>> {\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<McqQuestionViewedEntity | 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<McqQuestionViewedEntity>): Promise<McqQuestionViewedEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqQuestionViewedEntity, options?: SaveOptions): Promise<McqQuestionViewedEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqQuestionViewedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionViewedEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqQuestionViewedEntity, options?: SaveOptions): Promise<McqQuestionViewedEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqQuestionViewedEntity[],\n options?: SaveOptions,\n ): Promise<McqQuestionViewedEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqQuestionViewedEntity> | FindOptionsWhere<McqQuestionViewedEntity>[],\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<McqQuestionViewedEntity> | FindOptionsWhere<McqQuestionViewedEntity>[],\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 { ILike } from \"typeorm\";\nimport { McqSessionQuestionEntity } from \"../../../entities/gamification/mcq/McqSessionQuestionEntity\";\n\n@decorator.repository()\nexport class McqSessionQuestionRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqSessionQuestionEntity>> {\n return await this.database.open(McqSessionQuestionEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqSessionQuestionEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqSessionQuestionEntity>> {\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 question text search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n question: {\n text: ILike(`%${q}%`),\n },\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including question text search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n question: {\n text: ILike(`%${q}%`),\n },\n };\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<McqSessionQuestionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(\n criteria: FindOptionsWhere<McqSessionQuestionEntity>,\n ): Promise<McqSessionQuestionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqSessionQuestionEntity, options?: SaveOptions): Promise<McqSessionQuestionEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: McqSessionQuestionEntity[],\n options?: SaveOptions,\n ): Promise<McqSessionQuestionEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqSessionQuestionEntity, options?: SaveOptions): Promise<McqSessionQuestionEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: McqSessionQuestionEntity[],\n options?: SaveOptions,\n ): Promise<McqSessionQuestionEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqSessionQuestionEntity> | FindOptionsWhere<McqSessionQuestionEntity>[],\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<McqSessionQuestionEntity> | FindOptionsWhere<McqSessionQuestionEntity>[],\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 { ILike } from \"typeorm\";\nimport { McqSessionEntity } from \"../../../entities/gamification/mcq/McqSessionEntity\";\n\n@decorator.repository()\nexport class McqSessionRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<McqSessionEntity>> {\n return await this.database.open(McqSessionEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<McqSessionEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<McqSessionEntity>> {\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 session name search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n name: ILike(`%${q}%`),\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including name search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n name: ILike(`%${q}%`),\n };\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<McqSessionEntity | 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<McqSessionEntity>): Promise<McqSessionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: McqSessionEntity, options?: SaveOptions): Promise<McqSessionEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: McqSessionEntity[], options?: SaveOptions): Promise<McqSessionEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: McqSessionEntity, options?: SaveOptions): Promise<McqSessionEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: McqSessionEntity[], options?: SaveOptions): Promise<McqSessionEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<McqSessionEntity> | FindOptionsWhere<McqSessionEntity>[],\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<McqSessionEntity> | FindOptionsWhere<McqSessionEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n"
9
17
  ],
10
- "mappings": ";kRAAA,4BAAS,qCAMF,iBAAM,YAA4B,YAGpB,SAFnB,WAAW,CAEQ,EACjB,CADiB,qBAGN,KAAI,EAAiD,CAChE,OAAO,MAAM,KAAK,SAAS,KAAK,CAAuB,OAG5C,MAAK,EAAkB,CAClC,MAAM,KAAK,SAAS,MAAM,OAGf,KAAI,CACf,EACoD,CACpD,IAAM,EAAa,MAAM,KAAK,KAAK,GAE3B,OAAO,EAAG,QAAQ,OA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AChB,EACiB,CAGjB,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,MAAM,EAAW,CAAE,MAAO,CAAS,EAAI,CAAC,CAAC,EAErE,CAlHa,EAAN,GADN,GAAU,WAAW,EAGjB,OAAO,UAAU,GAFf,wFAAM",
19
+ "debugId": "EA4B44160548439A64756E2164756E21",
12
20
  "names": []
13
21
  }
@@ -1,10 +1,7 @@
1
- import { ITypeormDatabaseAdapter } from "@ooneex/database";
1
+ import { ITypeormDatabase } from "@ooneex/database";
2
2
  import { FilterResultType } from "@ooneex/types";
3
3
  import { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from "typeorm";
4
- import { IImage, ImageFormatType, ImageMimeType } from "@ooneex/image";
5
- import { IStatus } from "@ooneex/status";
6
- import { ITag } from "@ooneex/tag";
7
- import { ScalarType } from "@ooneex/types";
4
+ import { IImage, IImageComment } from "@ooneex/image";
8
5
  import { LocaleType } from "@ooneex/translation";
9
6
  import { IBase } from "@ooneex/types";
10
7
  declare abstract class BaseEntity implements IBase {
@@ -20,7 +17,161 @@ declare abstract class BaseEntity implements IBase {
20
17
  updatedAt?: Date;
21
18
  deletedAt?: Date;
22
19
  }
23
- declare class ImageEntity extends BaseEntity implements IImage {
20
+ declare class ImageCommentEntity extends BaseEntity implements IImageComment {
21
+ image?: IImage;
22
+ imageId?: string;
23
+ comment: string;
24
+ commentedBy?: string;
25
+ commentedById?: string;
26
+ parentCommentId?: string;
27
+ }
28
+ declare class ImageCommentRepository {
29
+ private readonly database;
30
+ constructor(database: ITypeormDatabase);
31
+ open(): Promise<Repository<ImageCommentEntity>>;
32
+ close(): Promise<void>;
33
+ find(criteria: FindManyOptions<ImageCommentEntity> & {
34
+ page?: number;
35
+ limit?: number;
36
+ q?: string;
37
+ }): Promise<FilterResultType<ImageCommentEntity>>;
38
+ findOne(id: string): Promise<ImageCommentEntity | null>;
39
+ findOneBy(criteria: FindOptionsWhere<ImageCommentEntity>): Promise<ImageCommentEntity | null>;
40
+ create(entity: ImageCommentEntity, options?: SaveOptions): Promise<ImageCommentEntity>;
41
+ createMany(entities: ImageCommentEntity[], options?: SaveOptions): Promise<ImageCommentEntity[]>;
42
+ update(entity: ImageCommentEntity, options?: SaveOptions): Promise<ImageCommentEntity>;
43
+ updateMany(entities: ImageCommentEntity[], options?: SaveOptions): Promise<ImageCommentEntity[]>;
44
+ delete(criteria: FindOptionsWhere<ImageCommentEntity> | FindOptionsWhere<ImageCommentEntity>[]): Promise<UpdateResult>;
45
+ count(criteria?: FindOptionsWhere<ImageCommentEntity> | FindOptionsWhere<ImageCommentEntity>[]): Promise<number>;
46
+ }
47
+ import { ITypeormDatabase as ITypeormDatabase2 } from "@ooneex/database";
48
+ import { FilterResultType as FilterResultType2 } from "@ooneex/types";
49
+ import { FindManyOptions as FindManyOptions2, FindOptionsWhere as FindOptionsWhere2, Repository as Repository2, SaveOptions as SaveOptions2, UpdateResult as UpdateResult2 } from "typeorm";
50
+ import { IImage as IImage2, IImageDisliked } from "@ooneex/image";
51
+ declare class ImageDislikedEntity extends BaseEntity implements IImageDisliked {
52
+ image?: IImage2;
53
+ imageId?: string;
54
+ dislikedBy?: string;
55
+ dislikedById?: string;
56
+ }
57
+ declare class ImageDislikedRepository {
58
+ private readonly database;
59
+ constructor(database: ITypeormDatabase2);
60
+ open(): Promise<Repository2<ImageDislikedEntity>>;
61
+ close(): Promise<void>;
62
+ find(criteria: FindManyOptions2<ImageDislikedEntity> & {
63
+ page?: number;
64
+ limit?: number;
65
+ q?: string;
66
+ }): Promise<FilterResultType2<ImageDislikedEntity>>;
67
+ findOne(id: string): Promise<ImageDislikedEntity | null>;
68
+ findOneBy(criteria: FindOptionsWhere2<ImageDislikedEntity>): Promise<ImageDislikedEntity | null>;
69
+ create(entity: ImageDislikedEntity, options?: SaveOptions2): Promise<ImageDislikedEntity>;
70
+ createMany(entities: ImageDislikedEntity[], options?: SaveOptions2): Promise<ImageDislikedEntity[]>;
71
+ update(entity: ImageDislikedEntity, options?: SaveOptions2): Promise<ImageDislikedEntity>;
72
+ updateMany(entities: ImageDislikedEntity[], options?: SaveOptions2): Promise<ImageDislikedEntity[]>;
73
+ delete(criteria: FindOptionsWhere2<ImageDislikedEntity> | FindOptionsWhere2<ImageDislikedEntity>[]): Promise<UpdateResult2>;
74
+ count(criteria?: FindOptionsWhere2<ImageDislikedEntity> | FindOptionsWhere2<ImageDislikedEntity>[]): Promise<number>;
75
+ }
76
+ import { ITypeormDatabase as ITypeormDatabase3 } from "@ooneex/database";
77
+ import { FilterResultType as FilterResultType3 } from "@ooneex/types";
78
+ import { FindManyOptions as FindManyOptions3, FindOptionsWhere as FindOptionsWhere3, Repository as Repository3, SaveOptions as SaveOptions3, UpdateResult as UpdateResult3 } from "typeorm";
79
+ import { IImage as IImage3, IImageDownloaded } from "@ooneex/image";
80
+ declare class ImageDownloadedEntity extends BaseEntity implements IImageDownloaded {
81
+ image?: IImage3;
82
+ imageId?: string;
83
+ downloadedBy?: string;
84
+ downloadedById?: string;
85
+ }
86
+ declare class ImageDownloadedRepository {
87
+ private readonly database;
88
+ constructor(database: ITypeormDatabase3);
89
+ open(): Promise<Repository3<ImageDownloadedEntity>>;
90
+ close(): Promise<void>;
91
+ find(criteria: FindManyOptions3<ImageDownloadedEntity> & {
92
+ page?: number;
93
+ limit?: number;
94
+ q?: string;
95
+ }): Promise<FilterResultType3<ImageDownloadedEntity>>;
96
+ findOne(id: string): Promise<ImageDownloadedEntity | null>;
97
+ findOneBy(criteria: FindOptionsWhere3<ImageDownloadedEntity>): Promise<ImageDownloadedEntity | null>;
98
+ create(entity: ImageDownloadedEntity, options?: SaveOptions3): Promise<ImageDownloadedEntity>;
99
+ createMany(entities: ImageDownloadedEntity[], options?: SaveOptions3): Promise<ImageDownloadedEntity[]>;
100
+ update(entity: ImageDownloadedEntity, options?: SaveOptions3): Promise<ImageDownloadedEntity>;
101
+ updateMany(entities: ImageDownloadedEntity[], options?: SaveOptions3): Promise<ImageDownloadedEntity[]>;
102
+ delete(criteria: FindOptionsWhere3<ImageDownloadedEntity> | FindOptionsWhere3<ImageDownloadedEntity>[]): Promise<UpdateResult3>;
103
+ count(criteria?: FindOptionsWhere3<ImageDownloadedEntity> | FindOptionsWhere3<ImageDownloadedEntity>[]): Promise<number>;
104
+ }
105
+ import { ITypeormDatabase as ITypeormDatabase4 } from "@ooneex/database";
106
+ import { FilterResultType as FilterResultType4 } from "@ooneex/types";
107
+ import { FindManyOptions as FindManyOptions4, FindOptionsWhere as FindOptionsWhere4, Repository as Repository4, SaveOptions as SaveOptions4, UpdateResult as UpdateResult4 } from "typeorm";
108
+ import { IImage as IImage4, IImageLiked } from "@ooneex/image";
109
+ declare class ImageLikedEntity extends BaseEntity implements IImageLiked {
110
+ image?: IImage4;
111
+ imageId?: string;
112
+ likedBy?: string;
113
+ likedById?: string;
114
+ }
115
+ declare class ImageLikedRepository {
116
+ private readonly database;
117
+ constructor(database: ITypeormDatabase4);
118
+ open(): Promise<Repository4<ImageLikedEntity>>;
119
+ close(): Promise<void>;
120
+ find(criteria: FindManyOptions4<ImageLikedEntity> & {
121
+ page?: number;
122
+ limit?: number;
123
+ q?: string;
124
+ }): Promise<FilterResultType4<ImageLikedEntity>>;
125
+ findOne(id: string): Promise<ImageLikedEntity | null>;
126
+ findOneBy(criteria: FindOptionsWhere4<ImageLikedEntity>): Promise<ImageLikedEntity | null>;
127
+ create(entity: ImageLikedEntity, options?: SaveOptions4): Promise<ImageLikedEntity>;
128
+ createMany(entities: ImageLikedEntity[], options?: SaveOptions4): Promise<ImageLikedEntity[]>;
129
+ update(entity: ImageLikedEntity, options?: SaveOptions4): Promise<ImageLikedEntity>;
130
+ updateMany(entities: ImageLikedEntity[], options?: SaveOptions4): Promise<ImageLikedEntity[]>;
131
+ delete(criteria: FindOptionsWhere4<ImageLikedEntity> | FindOptionsWhere4<ImageLikedEntity>[]): Promise<UpdateResult4>;
132
+ count(criteria?: FindOptionsWhere4<ImageLikedEntity> | FindOptionsWhere4<ImageLikedEntity>[]): Promise<number>;
133
+ }
134
+ import { ITypeormDatabase as ITypeormDatabase5 } from "@ooneex/database";
135
+ import { FilterResultType as FilterResultType5 } from "@ooneex/types";
136
+ import { FindManyOptions as FindManyOptions5, FindOptionsWhere as FindOptionsWhere5, Repository as Repository5, SaveOptions as SaveOptions5, UpdateResult as UpdateResult5 } from "typeorm";
137
+ import { IImage as IImage5, IImageReport } from "@ooneex/image";
138
+ import { IStatus } from "@ooneex/status";
139
+ declare class ImageReportEntity extends BaseEntity implements IImageReport {
140
+ image?: IImage5;
141
+ imageId?: string;
142
+ reason: string;
143
+ description?: string;
144
+ reportedBy?: string;
145
+ reportedById?: string;
146
+ status?: IStatus;
147
+ }
148
+ declare class ImageReportRepository {
149
+ private readonly database;
150
+ constructor(database: ITypeormDatabase5);
151
+ open(): Promise<Repository5<ImageReportEntity>>;
152
+ close(): Promise<void>;
153
+ find(criteria: FindManyOptions5<ImageReportEntity> & {
154
+ page?: number;
155
+ limit?: number;
156
+ q?: string;
157
+ }): Promise<FilterResultType5<ImageReportEntity>>;
158
+ findOne(id: string): Promise<ImageReportEntity | null>;
159
+ findOneBy(criteria: FindOptionsWhere5<ImageReportEntity>): Promise<ImageReportEntity | null>;
160
+ create(entity: ImageReportEntity, options?: SaveOptions5): Promise<ImageReportEntity>;
161
+ createMany(entities: ImageReportEntity[], options?: SaveOptions5): Promise<ImageReportEntity[]>;
162
+ update(entity: ImageReportEntity, options?: SaveOptions5): Promise<ImageReportEntity>;
163
+ updateMany(entities: ImageReportEntity[], options?: SaveOptions5): Promise<ImageReportEntity[]>;
164
+ delete(criteria: FindOptionsWhere5<ImageReportEntity> | FindOptionsWhere5<ImageReportEntity>[]): Promise<UpdateResult5>;
165
+ count(criteria?: FindOptionsWhere5<ImageReportEntity> | FindOptionsWhere5<ImageReportEntity>[]): Promise<number>;
166
+ }
167
+ import { ITypeormDatabase as ITypeormDatabase6 } from "@ooneex/database";
168
+ import { FilterResultType as FilterResultType6 } from "@ooneex/types";
169
+ import { FindManyOptions as FindManyOptions6, FindOptionsWhere as FindOptionsWhere6, Repository as Repository6, SaveOptions as SaveOptions6, UpdateResult as UpdateResult6 } from "typeorm";
170
+ import { IImage as IImage6, ImageFormatType, ImageMimeType } from "@ooneex/image";
171
+ import { IStatus as IStatus2 } from "@ooneex/status";
172
+ import { ITag } from "@ooneex/tag";
173
+ import { ScalarType } from "@ooneex/types";
174
+ declare class ImageEntity extends BaseEntity implements IImage6 {
24
175
  url: string;
25
176
  width?: number;
26
177
  height?: number;
@@ -32,26 +183,150 @@ declare class ImageEntity extends BaseEntity implements IImage {
32
183
  metadata?: Record<string, ScalarType>;
33
184
  context?: string;
34
185
  contextId?: string;
35
- status?: IStatus;
186
+ status?: IStatus2;
36
187
  tags?: ITag[];
37
188
  }
38
189
  declare class ImageRepository {
39
190
  private readonly database;
40
- constructor(database: ITypeormDatabaseAdapter);
41
- open(): Promise<Repository<ImageEntity>>;
191
+ constructor(database: ITypeormDatabase6);
192
+ open(): Promise<Repository6<ImageEntity>>;
42
193
  close(): Promise<void>;
43
- find(criteria: FindManyOptions<ImageEntity> & {
194
+ find(criteria: FindManyOptions6<ImageEntity> & {
44
195
  page?: number;
45
196
  limit?: number;
46
197
  q?: string;
47
- }): Promise<FilterResultType<ImageEntity>>;
198
+ }): Promise<FilterResultType6<ImageEntity>>;
48
199
  findOne(id: string): Promise<ImageEntity | null>;
49
- findOneBy(criteria: FindOptionsWhere<ImageEntity>): Promise<ImageEntity | null>;
50
- create(entity: ImageEntity, options?: SaveOptions): Promise<ImageEntity>;
51
- createMany(entities: ImageEntity[], options?: SaveOptions): Promise<ImageEntity[]>;
52
- update(entity: ImageEntity, options?: SaveOptions): Promise<ImageEntity>;
53
- updateMany(entities: ImageEntity[], options?: SaveOptions): Promise<ImageEntity[]>;
54
- delete(criteria: FindOptionsWhere<ImageEntity> | FindOptionsWhere<ImageEntity>[]): Promise<UpdateResult>;
55
- count(criteria?: FindOptionsWhere<ImageEntity> | FindOptionsWhere<ImageEntity>[]): Promise<number>;
56
- }
57
- export { ImageRepository };
200
+ findOneBy(criteria: FindOptionsWhere6<ImageEntity>): Promise<ImageEntity | null>;
201
+ create(entity: ImageEntity, options?: SaveOptions6): Promise<ImageEntity>;
202
+ createMany(entities: ImageEntity[], options?: SaveOptions6): Promise<ImageEntity[]>;
203
+ update(entity: ImageEntity, options?: SaveOptions6): Promise<ImageEntity>;
204
+ updateMany(entities: ImageEntity[], options?: SaveOptions6): Promise<ImageEntity[]>;
205
+ delete(criteria: FindOptionsWhere6<ImageEntity> | FindOptionsWhere6<ImageEntity>[]): Promise<UpdateResult6>;
206
+ count(criteria?: FindOptionsWhere6<ImageEntity> | FindOptionsWhere6<ImageEntity>[]): Promise<number>;
207
+ }
208
+ import { ITypeormDatabase as ITypeormDatabase7 } from "@ooneex/database";
209
+ import { FilterResultType as FilterResultType7 } from "@ooneex/types";
210
+ import { FindManyOptions as FindManyOptions7, FindOptionsWhere as FindOptionsWhere7, Repository as Repository7, SaveOptions as SaveOptions7, UpdateResult as UpdateResult7 } from "typeorm";
211
+ import { IImage as IImage7, IImageSaved } from "@ooneex/image";
212
+ declare class ImageSavedEntity extends BaseEntity implements IImageSaved {
213
+ image?: IImage7;
214
+ imageId?: string;
215
+ savedBy?: string;
216
+ savedById?: string;
217
+ }
218
+ declare class ImageSavedRepository {
219
+ private readonly database;
220
+ constructor(database: ITypeormDatabase7);
221
+ open(): Promise<Repository7<ImageSavedEntity>>;
222
+ close(): Promise<void>;
223
+ find(criteria: FindManyOptions7<ImageSavedEntity> & {
224
+ page?: number;
225
+ limit?: number;
226
+ q?: string;
227
+ }): Promise<FilterResultType7<ImageSavedEntity>>;
228
+ findOne(id: string): Promise<ImageSavedEntity | null>;
229
+ findOneBy(criteria: FindOptionsWhere7<ImageSavedEntity>): Promise<ImageSavedEntity | null>;
230
+ create(entity: ImageSavedEntity, options?: SaveOptions7): Promise<ImageSavedEntity>;
231
+ createMany(entities: ImageSavedEntity[], options?: SaveOptions7): Promise<ImageSavedEntity[]>;
232
+ update(entity: ImageSavedEntity, options?: SaveOptions7): Promise<ImageSavedEntity>;
233
+ updateMany(entities: ImageSavedEntity[], options?: SaveOptions7): Promise<ImageSavedEntity[]>;
234
+ delete(criteria: FindOptionsWhere7<ImageSavedEntity> | FindOptionsWhere7<ImageSavedEntity>[]): Promise<UpdateResult7>;
235
+ count(criteria?: FindOptionsWhere7<ImageSavedEntity> | FindOptionsWhere7<ImageSavedEntity>[]): Promise<number>;
236
+ }
237
+ import { ITypeormDatabase as ITypeormDatabase8 } from "@ooneex/database";
238
+ import { FilterResultType as FilterResultType8 } from "@ooneex/types";
239
+ import { FindManyOptions as FindManyOptions8, FindOptionsWhere as FindOptionsWhere8, Repository as Repository8, SaveOptions as SaveOptions8, UpdateResult as UpdateResult8 } from "typeorm";
240
+ import { IImage as IImage8, IImageShared } from "@ooneex/image";
241
+ declare class ImageSharedEntity extends BaseEntity implements IImageShared {
242
+ image?: IImage8;
243
+ imageId?: string;
244
+ sharedWith?: string;
245
+ sharedById?: string;
246
+ permission?: string;
247
+ expiresAt?: string;
248
+ }
249
+ declare class ImageSharedRepository {
250
+ private readonly database;
251
+ constructor(database: ITypeormDatabase8);
252
+ open(): Promise<Repository8<ImageSharedEntity>>;
253
+ close(): Promise<void>;
254
+ find(criteria: FindManyOptions8<ImageSharedEntity> & {
255
+ page?: number;
256
+ limit?: number;
257
+ q?: string;
258
+ }): Promise<FilterResultType8<ImageSharedEntity>>;
259
+ findOne(id: string): Promise<ImageSharedEntity | null>;
260
+ findOneBy(criteria: FindOptionsWhere8<ImageSharedEntity>): Promise<ImageSharedEntity | null>;
261
+ create(entity: ImageSharedEntity, options?: SaveOptions8): Promise<ImageSharedEntity>;
262
+ createMany(entities: ImageSharedEntity[], options?: SaveOptions8): Promise<ImageSharedEntity[]>;
263
+ update(entity: ImageSharedEntity, options?: SaveOptions8): Promise<ImageSharedEntity>;
264
+ updateMany(entities: ImageSharedEntity[], options?: SaveOptions8): Promise<ImageSharedEntity[]>;
265
+ delete(criteria: FindOptionsWhere8<ImageSharedEntity> | FindOptionsWhere8<ImageSharedEntity>[]): Promise<UpdateResult8>;
266
+ count(criteria?: FindOptionsWhere8<ImageSharedEntity> | FindOptionsWhere8<ImageSharedEntity>[]): Promise<number>;
267
+ }
268
+ import { ITypeormDatabase as ITypeormDatabase9 } from "@ooneex/database";
269
+ import { FilterResultType as FilterResultType9 } from "@ooneex/types";
270
+ import { FindManyOptions as FindManyOptions9, FindOptionsWhere as FindOptionsWhere9, Repository as Repository9, SaveOptions as SaveOptions9, UpdateResult as UpdateResult9 } from "typeorm";
271
+ import { IImage as IImage9, IImageStat } from "@ooneex/image";
272
+ declare class ImageStatEntity extends BaseEntity implements IImageStat {
273
+ image?: IImage9;
274
+ imageId?: string;
275
+ likesCount?: number;
276
+ dislikesCount?: number;
277
+ commentsCount?: number;
278
+ sharesCount?: number;
279
+ savesCount?: number;
280
+ downloadsCount?: number;
281
+ viewsCount?: number;
282
+ reportsCount?: number;
283
+ }
284
+ declare class ImageStatRepository {
285
+ private readonly database;
286
+ constructor(database: ITypeormDatabase9);
287
+ open(): Promise<Repository9<ImageStatEntity>>;
288
+ close(): Promise<void>;
289
+ find(criteria: FindManyOptions9<ImageStatEntity> & {
290
+ page?: number;
291
+ limit?: number;
292
+ q?: string;
293
+ }): Promise<FilterResultType9<ImageStatEntity>>;
294
+ findOne(id: string): Promise<ImageStatEntity | null>;
295
+ findOneBy(criteria: FindOptionsWhere9<ImageStatEntity>): Promise<ImageStatEntity | null>;
296
+ create(entity: ImageStatEntity, options?: SaveOptions9): Promise<ImageStatEntity>;
297
+ createMany(entities: ImageStatEntity[], options?: SaveOptions9): Promise<ImageStatEntity[]>;
298
+ update(entity: ImageStatEntity, options?: SaveOptions9): Promise<ImageStatEntity>;
299
+ updateMany(entities: ImageStatEntity[], options?: SaveOptions9): Promise<ImageStatEntity[]>;
300
+ delete(criteria: FindOptionsWhere9<ImageStatEntity> | FindOptionsWhere9<ImageStatEntity>[]): Promise<UpdateResult9>;
301
+ count(criteria?: FindOptionsWhere9<ImageStatEntity> | FindOptionsWhere9<ImageStatEntity>[]): Promise<number>;
302
+ }
303
+ import { ITypeormDatabase as ITypeormDatabase10 } from "@ooneex/database";
304
+ import { FilterResultType as FilterResultType10 } from "@ooneex/types";
305
+ import { FindManyOptions as FindManyOptions10, FindOptionsWhere as FindOptionsWhere10, Repository as Repository10, SaveOptions as SaveOptions10, UpdateResult as UpdateResult10 } from "typeorm";
306
+ import { IImage as IImage10, IImageViewed } from "@ooneex/image";
307
+ declare class ImageViewedEntity extends BaseEntity implements IImageViewed {
308
+ image?: IImage10;
309
+ imageId?: string;
310
+ viewedBy?: string;
311
+ viewedById?: string;
312
+ }
313
+ declare class ImageViewedRepository {
314
+ private readonly database;
315
+ constructor(database: ITypeormDatabase10);
316
+ open(): Promise<Repository10<ImageViewedEntity>>;
317
+ close(): Promise<void>;
318
+ find(criteria: FindManyOptions10<ImageViewedEntity> & {
319
+ page?: number;
320
+ limit?: number;
321
+ q?: string;
322
+ }): Promise<FilterResultType10<ImageViewedEntity>>;
323
+ findOne(id: string): Promise<ImageViewedEntity | null>;
324
+ findOneBy(criteria: FindOptionsWhere10<ImageViewedEntity>): Promise<ImageViewedEntity | null>;
325
+ create(entity: ImageViewedEntity, options?: SaveOptions10): Promise<ImageViewedEntity>;
326
+ createMany(entities: ImageViewedEntity[], options?: SaveOptions10): Promise<ImageViewedEntity[]>;
327
+ update(entity: ImageViewedEntity, options?: SaveOptions10): Promise<ImageViewedEntity>;
328
+ updateMany(entities: ImageViewedEntity[], options?: SaveOptions10): Promise<ImageViewedEntity[]>;
329
+ delete(criteria: FindOptionsWhere10<ImageViewedEntity> | FindOptionsWhere10<ImageViewedEntity>[]): Promise<UpdateResult10>;
330
+ count(criteria?: FindOptionsWhere10<ImageViewedEntity> | FindOptionsWhere10<ImageViewedEntity>[]): Promise<number>;
331
+ }
332
+ export { ImageViewedRepository, ImageStatRepository, ImageSharedRepository, ImageSavedRepository, ImageRepository, ImageReportRepository, ImageLikedRepository, ImageDownloadedRepository, ImageDislikedRepository, ImageCommentRepository };
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Q as X}from"../../../shared/chunk-2e7zbxcq.js";import"../../../shared/chunk-764bzjhz.js";import{V as T,W as U,X as V}from"../../../shared/chunk-j7nprmyh.js";import{inject as _}from"@ooneex/container";import{ILike as G}from"typeorm";class H{database;constructor(x){this.database=x}async open(){return await this.database.open(X)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...D}=x,J,N=A===0?100:A;if(z&&z>0&&A&&A>0)J=(z-1)*N;let K={...D,take:N,...J!==void 0&&{skip:J}};if(B){let F=[{alt:G(`%${B}%`)},{title:G(`%${B}%`)}];K={...K,where:D.where?[...F.map((M)=>({...D.where,...M}))]:F}}let Y=await v.find(K),Q=D.where;if(B){let F=[{alt:G(`%${B}%`)},{title:G(`%${B}%`)}];Q=D.where?[...F.map((M)=>({...D.where,...M}))]:F}let S=await this.count(Q),Z=Math.ceil(S/A);return{resources:Y,total:S,totalPages:Z,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}H=T([U(0,_("database")),V("design:paramtypes",[typeof ITypeormDatabaseAdapter==="undefined"?Object:ITypeormDatabaseAdapter])],H);export{H as ImageRepository};
2
+ import{ia as j,ja as D,ka as P,la as h,ma as S,na as E,oa as u,pa as R,qa as I}from"../../../shared/chunk-6gzanxfz.js";import{Ua as w}from"../../../shared/chunk-qqvx08b4.js";import"../../../shared/chunk-bdyby4d8.js";import"../../../shared/chunk-gcch857j.js";import"../../../shared/chunk-fjtw26pp.js";import{$a as M,_a as K,ab as N}from"../../../shared/chunk-x9h6vngs.js";import{inject as d}from"@ooneex/container";import{decorator as y}from"@ooneex/repository";class U{database;constructor(x){this.database=x}async open(){return await this.database.open(j)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}U=K([y.repository(),M(0,d("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],U);import{inject as g}from"@ooneex/container";import{decorator as l}from"@ooneex/repository";class X{database;constructor(x){this.database=x}async open(){return await this.database.open(D)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}X=K([l.repository(),M(0,g("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],X);import{inject as m}from"@ooneex/container";import{decorator as c}from"@ooneex/repository";class Y{database;constructor(x){this.database=x}async open(){return await this.database.open(P)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}Y=K([c.repository(),M(0,m("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],Y);import{inject as p}from"@ooneex/container";import{decorator as n}from"@ooneex/repository";class Z{database;constructor(x){this.database=x}async open(){return await this.database.open(h)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}Z=K([n.repository(),M(0,p("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],Z);import{inject as s}from"@ooneex/container";import{decorator as a}from"@ooneex/repository";class _{database;constructor(x){this.database=x}async open(){return await this.database.open(S)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}_=K([a.repository(),M(0,s("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],_);import{inject as r}from"@ooneex/container";import{decorator as o}from"@ooneex/repository";import{ILike as $}from"typeorm";class W{database;constructor(x){this.database=x}async open(){return await this.database.open(w)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,q:F,...B}=x,G,J=A===0?100:A;if(z&&z>0&&A&&A>0)G=(z-1)*J;let H={...B,take:J,...G!==void 0&&{skip:G}};if(F){let T=[{alt:$(`%${F}%`)},{title:$(`%${F}%`)}];H={...H,where:B.where?[...T.map((C)=>({...B.where,...C}))]:T}}let Q=await f.find(H),L=B.where;if(F){let T=[{alt:$(`%${F}%`)},{title:$(`%${F}%`)}];L=B.where?[...T.map((C)=>({...B.where,...C}))]:T}let b=await this.count(L),k=Math.ceil(b/A);return{resources:Q,total:b,totalPages:k,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}W=K([o.repository(),M(0,r("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],W);import{inject as e}from"@ooneex/container";import{decorator as t}from"@ooneex/repository";class O{database;constructor(x){this.database=x}async open(){return await this.database.open(E)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}O=K([t.repository(),M(0,e("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],O);import{inject as i}from"@ooneex/container";import{decorator as xx}from"@ooneex/repository";class v{database;constructor(x){this.database=x}async open(){return await this.database.open(u)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}v=K([xx.repository(),M(0,i("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],v);import{inject as fx}from"@ooneex/container";import{decorator as zx}from"@ooneex/repository";class V{database;constructor(x){this.database=x}async open(){return await this.database.open(R)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}V=K([zx.repository(),M(0,fx("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],V);import{inject as Ax}from"@ooneex/container";import{decorator as Bx}from"@ooneex/repository";class q{database;constructor(x){this.database=x}async open(){return await this.database.open(I)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}q=K([Bx.repository(),M(0,Ax("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],q);export{q as ImageViewedRepository,V as ImageStatRepository,v as ImageSharedRepository,O as ImageSavedRepository,W as ImageRepository,_ as ImageReportRepository,Z as ImageLikedRepository,Y as ImageDownloadedRepository,X as ImageDislikedRepository,U as ImageCommentRepository};
3
3
 
4
- //# debugId=ED9063CA2FFCEF9364756E2164756E21
4
+ //# debugId=6314D78F06529B8564756E2164756E21