@ooneex/typeorm 0.0.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/shared/chunk-19qhst35.js +5 -0
  2. package/dist/shared/chunk-19qhst35.js.map +12 -0
  3. package/dist/shared/chunk-31y260d6.js +101 -0
  4. package/dist/shared/chunk-31y260d6.js.map +11 -0
  5. package/dist/shared/chunk-59vwmfpm.js +5 -0
  6. package/dist/shared/chunk-59vwmfpm.js.map +9 -0
  7. package/dist/shared/chunk-5tnqjb3n.js +5 -0
  8. package/dist/shared/{chunk-eh420jqn.js.map → chunk-5tnqjb3n.js.map} +2 -2
  9. package/dist/shared/chunk-5ybg5hda.js +5 -0
  10. package/dist/shared/{chunk-pwhygf44.js.map → chunk-5ybg5hda.js.map} +2 -2
  11. package/dist/shared/chunk-6jnj2pfx.js +5 -0
  12. package/dist/shared/chunk-6jnj2pfx.js.map +10 -0
  13. package/dist/shared/chunk-6kdkyjbn.js +5 -0
  14. package/dist/shared/chunk-6kdkyjbn.js.map +10 -0
  15. package/dist/shared/chunk-aj0aak90.js +42 -0
  16. package/dist/shared/chunk-aj0aak90.js.map +10 -0
  17. package/dist/shared/chunk-e51ktjsq.js +5 -0
  18. package/dist/shared/chunk-e51ktjsq.js.map +18 -0
  19. package/dist/shared/chunk-jr0xys18.js +36 -0
  20. package/dist/shared/chunk-jr0xys18.js.map +10 -0
  21. package/dist/shared/chunk-kw4t1san.js +5 -0
  22. package/dist/shared/{chunk-wawk30n1.js.map → chunk-kw4t1san.js.map} +9 -4
  23. package/dist/shared/chunk-nfv9ce7v.js +5 -0
  24. package/dist/shared/{chunk-wmftwzcs.js.map → chunk-nfv9ce7v.js.map} +2 -2
  25. package/dist/shared/chunk-p22keb3y.js +5 -0
  26. package/dist/shared/{chunk-2e7zbxcq.js.map → chunk-p22keb3y.js.map} +2 -2
  27. package/dist/shared/chunk-pbns711f.js +5 -0
  28. package/dist/shared/chunk-pbns711f.js.map +10 -0
  29. package/dist/shared/chunk-qrs0g3m9.js +51 -0
  30. package/dist/shared/chunk-qrs0g3m9.js.map +10 -0
  31. package/dist/shared/chunk-qyf32qsz.js +82 -0
  32. package/dist/shared/chunk-qyf32qsz.js.map +10 -0
  33. package/dist/shared/chunk-t1jad451.js +5 -0
  34. package/dist/shared/chunk-t1jad451.js.map +21 -0
  35. package/dist/shared/chunk-t5cy307m.js +5 -0
  36. package/dist/shared/chunk-t5cy307m.js.map +10 -0
  37. package/dist/shared/chunk-x2d798hg.js +5 -0
  38. package/dist/shared/chunk-x2d798hg.js.map +11 -0
  39. package/dist/shared/chunk-x3pmm3na.js +5 -0
  40. package/dist/shared/chunk-x3pmm3na.js.map +21 -0
  41. package/dist/shared/chunk-xrqhqgen.js +5 -0
  42. package/dist/shared/{chunk-j7nprmyh.js.map → chunk-xrqhqgen.js.map} +2 -2
  43. package/dist/shared/chunk-xwe8m6av.js +5 -0
  44. package/dist/shared/{chunk-zmzz7hqq.js.map → chunk-xwe8m6av.js.map} +2 -2
  45. package/dist/shared/chunk-yrwsqc6r.js +5 -0
  46. package/dist/shared/chunk-yrwsqc6r.js.map +21 -0
  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
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["src/migrations/medecine/Migration20251229125356792.ts", "src/migrations/medecine/Migration20251229125419738.ts", "src/migrations/medecine/Migration20251229125441225.ts"],
4
+ "sourcesContent": [
5
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\n\n@decorator.migration()\nexport class Migration20251229125356792 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS medecine_disciplines (\n id VARCHAR(25) PRIMARY KEY,\n code VARCHAR(50) NOT NULL UNIQUE,\n name VARCHAR(200) NOT NULL,\n description TEXT,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_code ON medecine_disciplines(code)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_name ON medecine_disciplines(name)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_language ON medecine_disciplines(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_deleted_at ON medecine_disciplines(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_is_public ON medecine_disciplines(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_is_public_language ON medecine_disciplines(is_public, language) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_blocked ON medecine_disciplines(is_blocked, blocked_at) WHERE is_blocked = true\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_updated_at ON medecine_disciplines(updated_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_created_at ON medecine_disciplines(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_disciplines_active ON medecine_disciplines(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS medecine_disciplines CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251229125356792\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [];\n }\n}\n",
6
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\n\n@decorator.migration()\nexport class Migration20251229125419738 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS medecine_fields (\n id VARCHAR(25) PRIMARY KEY,\n code VARCHAR(50) NOT NULL UNIQUE,\n name VARCHAR(200) NOT NULL,\n color VARCHAR(20),\n description TEXT,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_code ON medecine_fields(code)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_name ON medecine_fields(name)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_language ON medecine_fields(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_deleted_at ON medecine_fields(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_is_public ON medecine_fields(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_is_public_language ON medecine_fields(is_public, language) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_blocked ON medecine_fields(is_blocked, blocked_at) WHERE is_blocked = true\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_updated_at ON medecine_fields(updated_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_created_at ON medecine_fields(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_fields_active ON medecine_fields(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS medecine_fields CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251229125419738\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [];\n }\n}\n",
7
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\n\n@decorator.migration()\nexport class Migration20251229125441225 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS medecine_years (\n id VARCHAR(25) PRIMARY KEY,\n code VARCHAR(20) NOT NULL UNIQUE,\n name VARCHAR(100) NOT NULL,\n number INT NOT NULL,\n color VARCHAR(20),\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_code ON medecine_years(code)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_name ON medecine_years(name)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_number ON medecine_years(number)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_language ON medecine_years(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_deleted_at ON medecine_years(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_is_public ON medecine_years(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_is_public_language ON medecine_years(is_public, language) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_blocked ON medecine_years(is_blocked, blocked_at) WHERE is_blocked = true\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_updated_at ON medecine_years(updated_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_created_at ON medecine_years(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_medecine_years_active ON medecine_years(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS medecine_years CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251229125441225\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [];\n }\n}\n"
8
+ ],
9
+ "mappings": ";uDAAA,oBAAS,2BAIF,MAAM,CAAiD,MAC/C,GAAE,CAAC,EAAmC,CACjD,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAmBN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,WAKK,KAAI,CAAC,EAAmC,CACnD,KAAM,sDAGD,UAAU,EAAW,CAC1B,MAAO,oBAGF,eAAe,EAAyB,CAC7C,MAAO,CAAC,EAEZ,CAzEa,EAAN,GADN,EAAU,UAAU,GACR,GCJb,oBAAS,2BAIF,MAAM,CAAiD,MAC/C,GAAE,CAAC,EAAmC,CACjD,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAoBN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,WAKK,KAAI,CAAC,EAAmC,CACnD,KAAM,iDAGD,UAAU,EAAW,CAC1B,MAAO,oBAGF,eAAe,EAAyB,CAC7C,MAAO,CAAC,EAEZ,CA1Ea,EAAN,GADN,EAAU,UAAU,GACR,GCJb,oBAAS,2BAIF,MAAM,CAAiD,MAC/C,GAAE,CAAC,EAAmC,CACjD,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAoBN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,MAIN,KAAM;AAAA;AAAA,WAKK,KAAI,CAAC,EAAmC,CACnD,KAAM,gDAGD,UAAU,EAAW,CAC1B,MAAO,oBAGF,eAAe,EAAyB,CAC7C,MAAO,CAAC,EAEZ,CA9Ea,EAAN,GADN,EAAU,UAAU,GACR",
10
+ "debugId": "B8E691DE62FBA00364756E2164756E21",
11
+ "names": []
12
+ }
@@ -0,0 +1,49 @@
1
+ import { IMigration, MigrationClassType } from "@ooneex/migrations";
2
+ import { TransactionSQL } from "bun";
3
+ declare class Migration20251225182218185 implements IMigration {
4
+ up(tx: TransactionSQL): Promise<void>;
5
+ down(tx: TransactionSQL): Promise<void>;
6
+ getVersion(): string;
7
+ getDependencies(): MigrationClassType[];
8
+ }
9
+ import { IMigration as IMigration2, MigrationClassType as MigrationClassType2 } from "@ooneex/migrations";
10
+ import { TransactionSQL as TransactionSQL2 } from "bun";
11
+ declare class Migration20251225182218188 implements IMigration2 {
12
+ up(tx: TransactionSQL2): Promise<void>;
13
+ down(tx: TransactionSQL2): Promise<void>;
14
+ getVersion(): string;
15
+ getDependencies(): MigrationClassType2[];
16
+ }
17
+ import { IMigration as IMigration3, MigrationClassType as MigrationClassType3 } from "@ooneex/migrations";
18
+ import { TransactionSQL as TransactionSQL3 } from "bun";
19
+ declare class Migration20251225182218190 implements IMigration3 {
20
+ up(tx: TransactionSQL3): Promise<void>;
21
+ down(tx: TransactionSQL3): Promise<void>;
22
+ getVersion(): string;
23
+ getDependencies(): MigrationClassType3[];
24
+ }
25
+ import { IMigration as IMigration4, MigrationClassType as MigrationClassType4 } from "@ooneex/migrations";
26
+ import { TransactionSQL as TransactionSQL4 } from "bun";
27
+ declare class Migration20251225182218192 implements IMigration4 {
28
+ up(tx: TransactionSQL4): Promise<void>;
29
+ down(tx: TransactionSQL4): Promise<void>;
30
+ getVersion(): string;
31
+ getDependencies(): MigrationClassType4[];
32
+ }
33
+ import { IMigration as IMigration5, MigrationClassType as MigrationClassType5 } from "@ooneex/migrations";
34
+ import { TransactionSQL as TransactionSQL5 } from "bun";
35
+ declare class Migration20251225182218195 implements IMigration5 {
36
+ up(tx: TransactionSQL5): Promise<void>;
37
+ down(tx: TransactionSQL5): Promise<void>;
38
+ getVersion(): string;
39
+ getDependencies(): MigrationClassType5[];
40
+ }
41
+ import { IMigration as IMigration6, MigrationClassType as MigrationClassType6 } from "@ooneex/migrations";
42
+ import { TransactionSQL as TransactionSQL6 } from "bun";
43
+ declare class Migration20251225182218197 implements IMigration6 {
44
+ up(tx: TransactionSQL6): Promise<void>;
45
+ down(tx: TransactionSQL6): Promise<void>;
46
+ getVersion(): string;
47
+ getDependencies(): MigrationClassType6[];
48
+ }
49
+ export { Migration20251225182218197, Migration20251225182218195, Migration20251225182218192, Migration20251225182218190, Migration20251225182218188, Migration20251225182218185 };
@@ -0,0 +1,352 @@
1
+ // @bun
2
+ import{a as o}from"../../../shared/chunk-qyf32qsz.js";import{b as T}from"../../../shared/chunk-qrs0g3m9.js";import{c as n}from"../../../shared/chunk-aj0aak90.js";import"../../../shared/chunk-31y260d6.js";import{Ha as e}from"../../../shared/chunk-59vwmfpm.js";import{decorator as c}from"@ooneex/migrations";class E{async up(a){await a`
3
+ CREATE TABLE IF NOT EXISTS payment_features (
4
+ id VARCHAR(25) PRIMARY KEY,
5
+ name VARCHAR(255) NOT NULL,
6
+ description TEXT,
7
+ is_enabled BOOLEAN DEFAULT true,
8
+ "limit" INT,
9
+ is_locked BOOLEAN DEFAULT false,
10
+ locked_at TIMESTAMPTZ,
11
+ is_blocked BOOLEAN DEFAULT false,
12
+ blocked_at TIMESTAMPTZ,
13
+ block_reason TEXT,
14
+ is_public BOOLEAN DEFAULT true,
15
+ language VARCHAR(10),
16
+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
17
+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
18
+ deleted_at TIMESTAMPTZ
19
+ )
20
+ `,await a`
21
+ CREATE INDEX IF NOT EXISTS idx_payment_features_name ON payment_features(name)
22
+ `,await a`
23
+ CREATE INDEX IF NOT EXISTS idx_payment_features_is_enabled ON payment_features(is_enabled)
24
+ `,await a`
25
+ CREATE INDEX IF NOT EXISTS idx_payment_features_language ON payment_features(language)
26
+ `,await a`
27
+ CREATE INDEX IF NOT EXISTS idx_payment_features_deleted_at ON payment_features(deleted_at)
28
+ `,await a`
29
+ CREATE INDEX IF NOT EXISTS idx_payment_features_is_public ON payment_features(is_public) WHERE deleted_at IS NULL
30
+ `,await a`
31
+ CREATE INDEX IF NOT EXISTS idx_payment_features_created_at ON payment_features(created_at DESC)
32
+ `,await a`
33
+ CREATE INDEX IF NOT EXISTS idx_payment_features_active ON payment_features(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
34
+ `}async down(a){await a`DROP TABLE IF EXISTS payment_features CASCADE`}getVersion(){return"20251225182218185"}getDependencies(){return[]}}E=e([c.migration()],E);import{decorator as d}from"@ooneex/migrations";class t{async up(a){await a`
35
+ CREATE TABLE IF NOT EXISTS payment_products (
36
+ id VARCHAR(25) PRIMARY KEY,
37
+ name VARCHAR(255) NOT NULL,
38
+ description TEXT,
39
+ currency VARCHAR(3) NOT NULL,
40
+ price DECIMAL(10, 2) NOT NULL,
41
+ barcode VARCHAR(255),
42
+ attributes JSONB,
43
+ is_locked BOOLEAN DEFAULT false,
44
+ locked_at TIMESTAMPTZ,
45
+ is_blocked BOOLEAN DEFAULT false,
46
+ blocked_at TIMESTAMPTZ,
47
+ block_reason TEXT,
48
+ is_public BOOLEAN DEFAULT true,
49
+ language VARCHAR(10),
50
+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
51
+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
52
+ deleted_at TIMESTAMPTZ
53
+ )
54
+ `,await a`
55
+ CREATE TABLE IF NOT EXISTS payment_products_categories (
56
+ product_id VARCHAR(25) NOT NULL,
57
+ category_id VARCHAR(25) NOT NULL,
58
+ PRIMARY KEY (product_id, category_id),
59
+ CONSTRAINT fk_payment_products_categories_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,
60
+ CONSTRAINT fk_payment_products_categories_category FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE CASCADE
61
+ )
62
+ `,await a`
63
+ CREATE TABLE IF NOT EXISTS payment_products_images (
64
+ product_id VARCHAR(25) NOT NULL,
65
+ image_id VARCHAR(25) NOT NULL,
66
+ PRIMARY KEY (product_id, image_id),
67
+ CONSTRAINT fk_payment_products_images_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,
68
+ CONSTRAINT fk_payment_products_images_image FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE
69
+ )
70
+ `,await a`
71
+ CREATE TABLE IF NOT EXISTS payment_products_tags (
72
+ product_id VARCHAR(25) NOT NULL,
73
+ tag_id VARCHAR(25) NOT NULL,
74
+ PRIMARY KEY (product_id, tag_id),
75
+ CONSTRAINT fk_payment_products_tags_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,
76
+ CONSTRAINT fk_payment_products_tags_tag FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE
77
+ )
78
+ `,await a`
79
+ CREATE INDEX IF NOT EXISTS idx_payment_products_name ON payment_products(name)
80
+ `,await a`
81
+ CREATE INDEX IF NOT EXISTS idx_payment_products_currency ON payment_products(currency)
82
+ `,await a`
83
+ CREATE INDEX IF NOT EXISTS idx_payment_products_price ON payment_products(price)
84
+ `,await a`
85
+ CREATE INDEX IF NOT EXISTS idx_payment_products_barcode ON payment_products(barcode)
86
+ `,await a`
87
+ CREATE INDEX IF NOT EXISTS idx_payment_products_language ON payment_products(language)
88
+ `,await a`
89
+ CREATE INDEX IF NOT EXISTS idx_payment_products_deleted_at ON payment_products(deleted_at)
90
+ `,await a`
91
+ CREATE INDEX IF NOT EXISTS idx_payment_products_is_public ON payment_products(is_public) WHERE deleted_at IS NULL
92
+ `,await a`
93
+ CREATE INDEX IF NOT EXISTS idx_payment_products_created_at ON payment_products(created_at DESC)
94
+ `,await a`
95
+ CREATE INDEX IF NOT EXISTS idx_payment_products_active ON payment_products(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
96
+ `,await a`
97
+ CREATE INDEX IF NOT EXISTS idx_payment_products_categories_product_id ON payment_products_categories(product_id)
98
+ `,await a`
99
+ CREATE INDEX IF NOT EXISTS idx_payment_products_categories_category_id ON payment_products_categories(category_id)
100
+ `,await a`
101
+ CREATE INDEX IF NOT EXISTS idx_payment_products_images_product_id ON payment_products_images(product_id)
102
+ `,await a`
103
+ CREATE INDEX IF NOT EXISTS idx_payment_products_images_image_id ON payment_products_images(image_id)
104
+ `,await a`
105
+ CREATE INDEX IF NOT EXISTS idx_payment_products_tags_product_id ON payment_products_tags(product_id)
106
+ `,await a`
107
+ CREATE INDEX IF NOT EXISTS idx_payment_products_tags_tag_id ON payment_products_tags(tag_id)
108
+ `}async down(a){await a`DROP TABLE IF EXISTS payment_products_tags CASCADE`,await a`DROP TABLE IF EXISTS payment_products_images CASCADE`,await a`DROP TABLE IF EXISTS payment_products_categories CASCADE`,await a`DROP TABLE IF EXISTS payment_products CASCADE`}getVersion(){return"20251225182218188"}getDependencies(){return[T,o,n]}}t=e([d.migration()],t);import{decorator as N}from"@ooneex/migrations";class i{async up(a){await a`
109
+ CREATE TYPE subscription_period AS ENUM ('monthly', 'yearly', 'weekly', 'daily')
110
+ `,await a`
111
+ CREATE TABLE IF NOT EXISTS payment_plans (
112
+ id VARCHAR(25) PRIMARY KEY,
113
+ name VARCHAR(255) NOT NULL,
114
+ description TEXT,
115
+ currency VARCHAR(3) NOT NULL,
116
+ price DECIMAL(10, 2) NOT NULL,
117
+ period subscription_period NOT NULL,
118
+ period_count INT DEFAULT 1,
119
+ is_active BOOLEAN DEFAULT true,
120
+ trial_days INT DEFAULT 0,
121
+ is_locked BOOLEAN DEFAULT false,
122
+ locked_at TIMESTAMPTZ,
123
+ is_blocked BOOLEAN DEFAULT false,
124
+ blocked_at TIMESTAMPTZ,
125
+ block_reason TEXT,
126
+ is_public BOOLEAN DEFAULT true,
127
+ language VARCHAR(10),
128
+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
129
+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
130
+ deleted_at TIMESTAMPTZ
131
+ )
132
+ `,await a`
133
+ CREATE TABLE IF NOT EXISTS payment_plans_features (
134
+ plan_id VARCHAR(25) NOT NULL,
135
+ feature_id VARCHAR(25) NOT NULL,
136
+ PRIMARY KEY (plan_id, feature_id),
137
+ CONSTRAINT fk_payment_plans_features_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE,
138
+ CONSTRAINT fk_payment_plans_features_feature FOREIGN KEY (feature_id) REFERENCES payment_features(id) ON DELETE CASCADE
139
+ )
140
+ `,await a`
141
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_name ON payment_plans(name)
142
+ `,await a`
143
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_currency ON payment_plans(currency)
144
+ `,await a`
145
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_price ON payment_plans(price)
146
+ `,await a`
147
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_period ON payment_plans(period)
148
+ `,await a`
149
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_is_active ON payment_plans(is_active)
150
+ `,await a`
151
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_language ON payment_plans(language)
152
+ `,await a`
153
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_deleted_at ON payment_plans(deleted_at)
154
+ `,await a`
155
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_is_public ON payment_plans(is_public) WHERE deleted_at IS NULL
156
+ `,await a`
157
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_created_at ON payment_plans(created_at DESC)
158
+ `,await a`
159
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_active ON payment_plans(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
160
+ `,await a`
161
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_active_plans ON payment_plans(is_active, price) WHERE deleted_at IS NULL AND is_active = true
162
+ `,await a`
163
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_features_plan_id ON payment_plans_features(plan_id)
164
+ `,await a`
165
+ CREATE INDEX IF NOT EXISTS idx_payment_plans_features_feature_id ON payment_plans_features(feature_id)
166
+ `}async down(a){await a`DROP TABLE IF EXISTS payment_plans_features CASCADE`,await a`DROP TABLE IF EXISTS payment_plans CASCADE`,await a`DROP TYPE IF EXISTS subscription_period CASCADE`}getVersion(){return"20251225182218190"}getDependencies(){return[E]}}i=e([N.migration()],i);import{decorator as r}from"@ooneex/migrations";class _{async up(a){await a`
167
+ CREATE TYPE discount_type AS ENUM ('percentage', 'fixed')
168
+ `,await a`
169
+ CREATE TABLE IF NOT EXISTS payment_coupons (
170
+ id VARCHAR(25) PRIMARY KEY,
171
+ code VARCHAR(50) NOT NULL UNIQUE,
172
+ name VARCHAR(255),
173
+ description TEXT,
174
+ discount_type discount_type NOT NULL,
175
+ discount_value DECIMAL(10, 2) NOT NULL,
176
+ currency VARCHAR(3),
177
+ max_uses INT,
178
+ used_count INT DEFAULT 0,
179
+ start_at TIMESTAMPTZ,
180
+ end_at TIMESTAMPTZ,
181
+ is_active BOOLEAN DEFAULT true,
182
+ minimum_amount DECIMAL(10, 2),
183
+ is_locked BOOLEAN DEFAULT false,
184
+ locked_at TIMESTAMPTZ,
185
+ is_blocked BOOLEAN DEFAULT false,
186
+ blocked_at TIMESTAMPTZ,
187
+ block_reason TEXT,
188
+ is_public BOOLEAN DEFAULT true,
189
+ language VARCHAR(10),
190
+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
191
+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
192
+ deleted_at TIMESTAMPTZ
193
+ )
194
+ `,await a`
195
+ CREATE TABLE IF NOT EXISTS payment_coupons_applicable_products (
196
+ coupon_id VARCHAR(25) NOT NULL,
197
+ product_id VARCHAR(25) NOT NULL,
198
+ PRIMARY KEY (coupon_id, product_id),
199
+ CONSTRAINT fk_payment_coupons_applicable_products_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE,
200
+ CONSTRAINT fk_payment_coupons_applicable_products_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE
201
+ )
202
+ `,await a`
203
+ CREATE TABLE IF NOT EXISTS payment_coupons_applicable_plans (
204
+ coupon_id VARCHAR(25) NOT NULL,
205
+ plan_id VARCHAR(25) NOT NULL,
206
+ PRIMARY KEY (coupon_id, plan_id),
207
+ CONSTRAINT fk_payment_coupons_applicable_plans_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE,
208
+ CONSTRAINT fk_payment_coupons_applicable_plans_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE
209
+ )
210
+ `,await a`
211
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_code ON payment_coupons(code)
212
+ `,await a`
213
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_discount_type ON payment_coupons(discount_type)
214
+ `,await a`
215
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_is_active ON payment_coupons(is_active)
216
+ `,await a`
217
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_start_at ON payment_coupons(start_at)
218
+ `,await a`
219
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_end_at ON payment_coupons(end_at)
220
+ `,await a`
221
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_language ON payment_coupons(language)
222
+ `,await a`
223
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_deleted_at ON payment_coupons(deleted_at)
224
+ `,await a`
225
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_is_public ON payment_coupons(is_public) WHERE deleted_at IS NULL
226
+ `,await a`
227
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_created_at ON payment_coupons(created_at DESC)
228
+ `,await a`
229
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_active ON payment_coupons(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
230
+ `,await a`
231
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_valid ON payment_coupons(is_active, start_at, end_at) WHERE deleted_at IS NULL AND is_active = true AND (start_at IS NULL OR start_at <= CURRENT_TIMESTAMP) AND (end_at IS NULL OR end_at >= CURRENT_TIMESTAMP)
232
+ `,await a`
233
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_products_coupon_id ON payment_coupons_applicable_products(coupon_id)
234
+ `,await a`
235
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_products_product_id ON payment_coupons_applicable_products(product_id)
236
+ `,await a`
237
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_plans_coupon_id ON payment_coupons_applicable_plans(coupon_id)
238
+ `,await a`
239
+ CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_plans_plan_id ON payment_coupons_applicable_plans(plan_id)
240
+ `}async down(a){await a`DROP TABLE IF EXISTS payment_coupons_applicable_plans CASCADE`,await a`DROP TABLE IF EXISTS payment_coupons_applicable_products CASCADE`,await a`DROP TABLE IF EXISTS payment_coupons CASCADE`,await a`DROP TYPE IF EXISTS discount_type CASCADE`}getVersion(){return"20251225182218192"}getDependencies(){return[t,i]}}_=e([r.migration()],_);import{decorator as I}from"@ooneex/migrations";class s{async up(a){await a`
241
+ CREATE TABLE IF NOT EXISTS payment_credits (
242
+ id VARCHAR(25) PRIMARY KEY,
243
+ balance DECIMAL(10, 2) NOT NULL,
244
+ currency VARCHAR(3),
245
+ expires_at TIMESTAMPTZ,
246
+ description TEXT,
247
+ is_locked BOOLEAN DEFAULT false,
248
+ locked_at TIMESTAMPTZ,
249
+ is_blocked BOOLEAN DEFAULT false,
250
+ blocked_at TIMESTAMPTZ,
251
+ block_reason TEXT,
252
+ is_public BOOLEAN DEFAULT true,
253
+ language VARCHAR(10),
254
+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
255
+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
256
+ deleted_at TIMESTAMPTZ
257
+ )
258
+ `,await a`
259
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_balance ON payment_credits(balance)
260
+ `,await a`
261
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_currency ON payment_credits(currency)
262
+ `,await a`
263
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_expires_at ON payment_credits(expires_at)
264
+ `,await a`
265
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_language ON payment_credits(language)
266
+ `,await a`
267
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_deleted_at ON payment_credits(deleted_at)
268
+ `,await a`
269
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_is_public ON payment_credits(is_public) WHERE deleted_at IS NULL
270
+ `,await a`
271
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_created_at ON payment_credits(created_at DESC)
272
+ `,await a`
273
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_active ON payment_credits(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
274
+ `,await a`
275
+ CREATE INDEX IF NOT EXISTS idx_payment_credits_valid ON payment_credits(expires_at) WHERE deleted_at IS NULL AND (expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP)
276
+ `}async down(a){await a`DROP TABLE IF EXISTS payment_credits CASCADE`}getVersion(){return"20251225182218195"}getDependencies(){return[]}}s=e([I.migration()],s);import{decorator as A}from"@ooneex/migrations";class p{async up(a){await a`
277
+ CREATE TABLE IF NOT EXISTS payment_subscriptions (
278
+ id VARCHAR(25) PRIMARY KEY,
279
+ start_at TIMESTAMPTZ NOT NULL,
280
+ end_at TIMESTAMPTZ,
281
+ is_trial BOOLEAN DEFAULT false,
282
+ is_active BOOLEAN DEFAULT true,
283
+ is_locked BOOLEAN DEFAULT false,
284
+ locked_at TIMESTAMPTZ,
285
+ is_blocked BOOLEAN DEFAULT false,
286
+ blocked_at TIMESTAMPTZ,
287
+ block_reason TEXT,
288
+ is_public BOOLEAN DEFAULT true,
289
+ language VARCHAR(10),
290
+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
291
+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
292
+ deleted_at TIMESTAMPTZ
293
+ )
294
+ `,await a`
295
+ CREATE TABLE IF NOT EXISTS payment_subscriptions_coupons (
296
+ subscription_id VARCHAR(25) NOT NULL,
297
+ coupon_id VARCHAR(25) NOT NULL,
298
+ PRIMARY KEY (subscription_id, coupon_id),
299
+ CONSTRAINT fk_payment_subscriptions_coupons_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,
300
+ CONSTRAINT fk_payment_subscriptions_coupons_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE
301
+ )
302
+ `,await a`
303
+ CREATE TABLE IF NOT EXISTS payment_subscriptions_plans (
304
+ subscription_id VARCHAR(25) NOT NULL,
305
+ plan_id VARCHAR(25) NOT NULL,
306
+ PRIMARY KEY (subscription_id, plan_id),
307
+ CONSTRAINT fk_payment_subscriptions_plans_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,
308
+ CONSTRAINT fk_payment_subscriptions_plans_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE
309
+ )
310
+ `,await a`
311
+ CREATE TABLE IF NOT EXISTS payment_subscriptions_credits (
312
+ subscription_id VARCHAR(25) NOT NULL,
313
+ credit_id VARCHAR(25) NOT NULL,
314
+ PRIMARY KEY (subscription_id, credit_id),
315
+ CONSTRAINT fk_payment_subscriptions_credits_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,
316
+ CONSTRAINT fk_payment_subscriptions_credits_credit FOREIGN KEY (credit_id) REFERENCES payment_credits(id) ON DELETE CASCADE
317
+ )
318
+ `,await a`
319
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_start_at ON payment_subscriptions(start_at DESC)
320
+ `,await a`
321
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_end_at ON payment_subscriptions(end_at)
322
+ `,await a`
323
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_trial ON payment_subscriptions(is_trial)
324
+ `,await a`
325
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_active ON payment_subscriptions(is_active)
326
+ `,await a`
327
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_language ON payment_subscriptions(language)
328
+ `,await a`
329
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_deleted_at ON payment_subscriptions(deleted_at)
330
+ `,await a`
331
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_public ON payment_subscriptions(is_public) WHERE deleted_at IS NULL
332
+ `,await a`
333
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_created_at ON payment_subscriptions(created_at DESC)
334
+ `,await a`
335
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_active ON payment_subscriptions(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
336
+ `,await a`
337
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_active_subs ON payment_subscriptions(is_active, start_at, end_at) WHERE deleted_at IS NULL AND is_active = true
338
+ `,await a`
339
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_coupons_subscription_id ON payment_subscriptions_coupons(subscription_id)
340
+ `,await a`
341
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_coupons_coupon_id ON payment_subscriptions_coupons(coupon_id)
342
+ `,await a`
343
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_plans_subscription_id ON payment_subscriptions_plans(subscription_id)
344
+ `,await a`
345
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_plans_plan_id ON payment_subscriptions_plans(plan_id)
346
+ `,await a`
347
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_credits_subscription_id ON payment_subscriptions_credits(subscription_id)
348
+ `,await a`
349
+ CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_credits_credit_id ON payment_subscriptions_credits(credit_id)
350
+ `}async down(a){await a`DROP TABLE IF EXISTS payment_subscriptions_credits CASCADE`,await a`DROP TABLE IF EXISTS payment_subscriptions_plans CASCADE`,await a`DROP TABLE IF EXISTS payment_subscriptions_coupons CASCADE`,await a`DROP TABLE IF EXISTS payment_subscriptions CASCADE`}getVersion(){return"20251225182218197"}getDependencies(){return[_,i,s]}}p=e([A.migration()],p);export{p as Migration20251225182218197,s as Migration20251225182218195,_ as Migration20251225182218192,i as Migration20251225182218190,t as Migration20251225182218188,E as Migration20251225182218185};
351
+
352
+ //# debugId=17B4BC90CC4DD0FA64756E2164756E21
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["src/migrations/payment/Migration20251225182218185.ts", "src/migrations/payment/Migration20251225182218188.ts", "src/migrations/payment/Migration20251225182218190.ts", "src/migrations/payment/Migration20251225182218192.ts", "src/migrations/payment/Migration20251225182218195.ts", "src/migrations/payment/Migration20251225182218197.ts"],
4
+ "sourcesContent": [
5
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\n\n@decorator.migration()\nexport class Migration20251225182218185 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS payment_features (\n id VARCHAR(25) PRIMARY KEY,\n name VARCHAR(255) NOT NULL,\n description TEXT,\n is_enabled BOOLEAN DEFAULT true,\n \"limit\" INT,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_features_name ON payment_features(name)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_features_is_enabled ON payment_features(is_enabled)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_features_language ON payment_features(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_features_deleted_at ON payment_features(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_features_is_public ON payment_features(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_features_created_at ON payment_features(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_features_active ON payment_features(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS payment_features CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182218185\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [];\n }\n}\n",
6
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225173351645 } from \"../common/Migration20251225173351645\";\nimport { Migration20251225173352645 } from \"../common/Migration20251225173352645\";\nimport { Migration20251225181613479 } from \"../image/Migration20251225181613479\";\n\n@decorator.migration()\nexport class Migration20251225182218188 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS payment_products (\n id VARCHAR(25) PRIMARY KEY,\n name VARCHAR(255) NOT NULL,\n description TEXT,\n currency VARCHAR(3) NOT NULL,\n price DECIMAL(10, 2) NOT NULL,\n barcode VARCHAR(255),\n attributes JSONB,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_products_categories (\n product_id VARCHAR(25) NOT NULL,\n category_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (product_id, category_id),\n CONSTRAINT fk_payment_products_categories_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_products_categories_category FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_products_images (\n product_id VARCHAR(25) NOT NULL,\n image_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (product_id, image_id),\n CONSTRAINT fk_payment_products_images_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_products_images_image FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_products_tags (\n product_id VARCHAR(25) NOT NULL,\n tag_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (product_id, tag_id),\n CONSTRAINT fk_payment_products_tags_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_products_tags_tag FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_name ON payment_products(name)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_currency ON payment_products(currency)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_price ON payment_products(price)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_barcode ON payment_products(barcode)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_language ON payment_products(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_deleted_at ON payment_products(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_is_public ON payment_products(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_created_at ON payment_products(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_active ON payment_products(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_categories_product_id ON payment_products_categories(product_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_categories_category_id ON payment_products_categories(category_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_images_product_id ON payment_products_images(product_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_images_image_id ON payment_products_images(image_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_tags_product_id ON payment_products_tags(product_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_products_tags_tag_id ON payment_products_tags(tag_id)\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS payment_products_tags CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_products_images CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_products_categories CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_products CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182218188\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [\n Migration20251225173352645, // Categories table\n Migration20251225181613479, // Images table\n Migration20251225173351645, // Tags table\n ];\n }\n}\n",
7
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182218185 } from \"./Migration20251225182218185\";\n\n@decorator.migration()\nexport class Migration20251225182218190 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TYPE subscription_period AS ENUM ('monthly', 'yearly', 'weekly', 'daily')\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_plans (\n id VARCHAR(25) PRIMARY KEY,\n name VARCHAR(255) NOT NULL,\n description TEXT,\n currency VARCHAR(3) NOT NULL,\n price DECIMAL(10, 2) NOT NULL,\n period subscription_period NOT NULL,\n period_count INT DEFAULT 1,\n is_active BOOLEAN DEFAULT true,\n trial_days INT DEFAULT 0,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_plans_features (\n plan_id VARCHAR(25) NOT NULL,\n feature_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (plan_id, feature_id),\n CONSTRAINT fk_payment_plans_features_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_plans_features_feature FOREIGN KEY (feature_id) REFERENCES payment_features(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_name ON payment_plans(name)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_currency ON payment_plans(currency)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_price ON payment_plans(price)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_period ON payment_plans(period)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_is_active ON payment_plans(is_active)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_language ON payment_plans(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_deleted_at ON payment_plans(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_is_public ON payment_plans(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_created_at ON payment_plans(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_active ON payment_plans(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_active_plans ON payment_plans(is_active, price) WHERE deleted_at IS NULL AND is_active = true\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_features_plan_id ON payment_plans_features(plan_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_plans_features_feature_id ON payment_plans_features(feature_id)\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS payment_plans_features CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_plans CASCADE`;\n await tx`DROP TYPE IF EXISTS subscription_period CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182218190\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [\n Migration20251225182218185, // Payment features table\n ];\n }\n}\n",
8
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182218188 } from \"./Migration20251225182218188\";\nimport { Migration20251225182218190 } from \"./Migration20251225182218190\";\n\n@decorator.migration()\nexport class Migration20251225182218192 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TYPE discount_type AS ENUM ('percentage', 'fixed')\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_coupons (\n id VARCHAR(25) PRIMARY KEY,\n code VARCHAR(50) NOT NULL UNIQUE,\n name VARCHAR(255),\n description TEXT,\n discount_type discount_type NOT NULL,\n discount_value DECIMAL(10, 2) NOT NULL,\n currency VARCHAR(3),\n max_uses INT,\n used_count INT DEFAULT 0,\n start_at TIMESTAMPTZ,\n end_at TIMESTAMPTZ,\n is_active BOOLEAN DEFAULT true,\n minimum_amount DECIMAL(10, 2),\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_coupons_applicable_products (\n coupon_id VARCHAR(25) NOT NULL,\n product_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (coupon_id, product_id),\n CONSTRAINT fk_payment_coupons_applicable_products_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_coupons_applicable_products_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_coupons_applicable_plans (\n coupon_id VARCHAR(25) NOT NULL,\n plan_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (coupon_id, plan_id),\n CONSTRAINT fk_payment_coupons_applicable_plans_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_coupons_applicable_plans_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_code ON payment_coupons(code)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_discount_type ON payment_coupons(discount_type)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_is_active ON payment_coupons(is_active)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_start_at ON payment_coupons(start_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_end_at ON payment_coupons(end_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_language ON payment_coupons(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_deleted_at ON payment_coupons(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_is_public ON payment_coupons(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_created_at ON payment_coupons(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_active ON payment_coupons(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_valid ON payment_coupons(is_active, start_at, end_at) WHERE deleted_at IS NULL AND is_active = true AND (start_at IS NULL OR start_at <= CURRENT_TIMESTAMP) AND (end_at IS NULL OR end_at >= CURRENT_TIMESTAMP)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_products_coupon_id ON payment_coupons_applicable_products(coupon_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_products_product_id ON payment_coupons_applicable_products(product_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_plans_coupon_id ON payment_coupons_applicable_plans(coupon_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_plans_plan_id ON payment_coupons_applicable_plans(plan_id)\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS payment_coupons_applicable_plans CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_coupons_applicable_products CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_coupons CASCADE`;\n await tx`DROP TYPE IF EXISTS discount_type CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182218192\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [\n Migration20251225182218188, // Payment products table\n Migration20251225182218190, // Payment plans table\n ];\n }\n}\n",
9
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\n\n@decorator.migration()\nexport class Migration20251225182218195 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS payment_credits (\n id VARCHAR(25) PRIMARY KEY,\n balance DECIMAL(10, 2) NOT NULL,\n currency VARCHAR(3),\n expires_at TIMESTAMPTZ,\n description TEXT,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_balance ON payment_credits(balance)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_currency ON payment_credits(currency)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_expires_at ON payment_credits(expires_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_language ON payment_credits(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_deleted_at ON payment_credits(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_is_public ON payment_credits(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_created_at ON payment_credits(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_active ON payment_credits(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_credits_valid ON payment_credits(expires_at) WHERE deleted_at IS NULL AND (expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP)\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS payment_credits CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182218195\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [];\n }\n}\n",
10
+ "import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182218190 } from \"./Migration20251225182218190\";\nimport { Migration20251225182218192 } from \"./Migration20251225182218192\";\nimport { Migration20251225182218195 } from \"./Migration20251225182218195\";\n\n@decorator.migration()\nexport class Migration20251225182218197 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS payment_subscriptions (\n id VARCHAR(25) PRIMARY KEY,\n start_at TIMESTAMPTZ NOT NULL,\n end_at TIMESTAMPTZ,\n is_trial BOOLEAN DEFAULT false,\n is_active BOOLEAN DEFAULT true,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_subscriptions_coupons (\n subscription_id VARCHAR(25) NOT NULL,\n coupon_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (subscription_id, coupon_id),\n CONSTRAINT fk_payment_subscriptions_coupons_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_subscriptions_coupons_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_subscriptions_plans (\n subscription_id VARCHAR(25) NOT NULL,\n plan_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (subscription_id, plan_id),\n CONSTRAINT fk_payment_subscriptions_plans_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_subscriptions_plans_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS payment_subscriptions_credits (\n subscription_id VARCHAR(25) NOT NULL,\n credit_id VARCHAR(25) NOT NULL,\n PRIMARY KEY (subscription_id, credit_id),\n CONSTRAINT fk_payment_subscriptions_credits_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,\n CONSTRAINT fk_payment_subscriptions_credits_credit FOREIGN KEY (credit_id) REFERENCES payment_credits(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_start_at ON payment_subscriptions(start_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_end_at ON payment_subscriptions(end_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_trial ON payment_subscriptions(is_trial)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_active ON payment_subscriptions(is_active)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_language ON payment_subscriptions(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_deleted_at ON payment_subscriptions(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_public ON payment_subscriptions(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_created_at ON payment_subscriptions(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_active ON payment_subscriptions(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_active_subs ON payment_subscriptions(is_active, start_at, end_at) WHERE deleted_at IS NULL AND is_active = true\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_coupons_subscription_id ON payment_subscriptions_coupons(subscription_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_coupons_coupon_id ON payment_subscriptions_coupons(coupon_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_plans_subscription_id ON payment_subscriptions_plans(subscription_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_plans_plan_id ON payment_subscriptions_plans(plan_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_credits_subscription_id ON payment_subscriptions_credits(subscription_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_credits_credit_id ON payment_subscriptions_credits(credit_id)\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS payment_subscriptions_credits CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_subscriptions_plans CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_subscriptions_coupons CASCADE`;\n await tx`DROP TABLE IF EXISTS payment_subscriptions CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182218197\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [\n Migration20251225182218192, // Payment coupons table\n Migration20251225182218190, // Payment plans table\n Migration20251225182218195, // Payment credits table\n ];\n }\n}\n"
11
+ ],
12
+ "mappings": "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",
13
+ "debugId": "17B4BC90CC4DD0FA64756E2164756E21",
14
+ "names": []
15
+ }
@@ -0,0 +1,81 @@
1
+ import { IMigration, MigrationClassType } from "@ooneex/migrations";
2
+ import { TransactionSQL } from "bun";
3
+ declare class Migration20251225182641298 implements IMigration {
4
+ up(tx: TransactionSQL): Promise<void>;
5
+ down(tx: TransactionSQL): Promise<void>;
6
+ getVersion(): string;
7
+ getDependencies(): MigrationClassType[];
8
+ }
9
+ import { IMigration as IMigration2, MigrationClassType as MigrationClassType2 } from "@ooneex/migrations";
10
+ import { TransactionSQL as TransactionSQL2 } from "bun";
11
+ declare class Migration20251225182641300 implements IMigration2 {
12
+ up(tx: TransactionSQL2): Promise<void>;
13
+ down(tx: TransactionSQL2): Promise<void>;
14
+ getVersion(): string;
15
+ getDependencies(): MigrationClassType2[];
16
+ }
17
+ import { IMigration as IMigration3, MigrationClassType as MigrationClassType3 } from "@ooneex/migrations";
18
+ import { TransactionSQL as TransactionSQL3 } from "bun";
19
+ declare class Migration20251225182641303 implements IMigration3 {
20
+ up(tx: TransactionSQL3): Promise<void>;
21
+ down(tx: TransactionSQL3): Promise<void>;
22
+ getVersion(): string;
23
+ getDependencies(): MigrationClassType3[];
24
+ }
25
+ import { IMigration as IMigration4, MigrationClassType as MigrationClassType4 } from "@ooneex/migrations";
26
+ import { TransactionSQL as TransactionSQL4 } from "bun";
27
+ declare class Migration20251225182641305 implements IMigration4 {
28
+ up(tx: TransactionSQL4): Promise<void>;
29
+ down(tx: TransactionSQL4): Promise<void>;
30
+ getVersion(): string;
31
+ getDependencies(): MigrationClassType4[];
32
+ }
33
+ import { IMigration as IMigration5, MigrationClassType as MigrationClassType5 } from "@ooneex/migrations";
34
+ import { TransactionSQL as TransactionSQL5 } from "bun";
35
+ declare class Migration20251225182641307 implements IMigration5 {
36
+ up(tx: TransactionSQL5): Promise<void>;
37
+ down(tx: TransactionSQL5): Promise<void>;
38
+ getVersion(): string;
39
+ getDependencies(): MigrationClassType5[];
40
+ }
41
+ import { IMigration as IMigration6, MigrationClassType as MigrationClassType6 } from "@ooneex/migrations";
42
+ import { TransactionSQL as TransactionSQL6 } from "bun";
43
+ declare class Migration20251225182641310 implements IMigration6 {
44
+ up(tx: TransactionSQL6): Promise<void>;
45
+ down(tx: TransactionSQL6): Promise<void>;
46
+ getVersion(): string;
47
+ getDependencies(): MigrationClassType6[];
48
+ }
49
+ import { IMigration as IMigration7, MigrationClassType as MigrationClassType7 } from "@ooneex/migrations";
50
+ import { TransactionSQL as TransactionSQL7 } from "bun";
51
+ declare class Migration20251225182641312 implements IMigration7 {
52
+ up(tx: TransactionSQL7): Promise<void>;
53
+ down(tx: TransactionSQL7): Promise<void>;
54
+ getVersion(): string;
55
+ getDependencies(): MigrationClassType7[];
56
+ }
57
+ import { IMigration as IMigration8, MigrationClassType as MigrationClassType8 } from "@ooneex/migrations";
58
+ import { TransactionSQL as TransactionSQL8 } from "bun";
59
+ declare class Migration20251225182641314 implements IMigration8 {
60
+ up(tx: TransactionSQL8): Promise<void>;
61
+ down(tx: TransactionSQL8): Promise<void>;
62
+ getVersion(): string;
63
+ getDependencies(): MigrationClassType8[];
64
+ }
65
+ import { IMigration as IMigration9, MigrationClassType as MigrationClassType9 } from "@ooneex/migrations";
66
+ import { TransactionSQL as TransactionSQL9 } from "bun";
67
+ declare class Migration20251225182641316 implements IMigration9 {
68
+ up(tx: TransactionSQL9): Promise<void>;
69
+ down(tx: TransactionSQL9): Promise<void>;
70
+ getVersion(): string;
71
+ getDependencies(): MigrationClassType9[];
72
+ }
73
+ import { IMigration as IMigration10, MigrationClassType as MigrationClassType10 } from "@ooneex/migrations";
74
+ import { TransactionSQL as TransactionSQL10 } from "bun";
75
+ declare class Migration20251225182641319 implements IMigration10 {
76
+ up(tx: TransactionSQL10): Promise<void>;
77
+ down(tx: TransactionSQL10): Promise<void>;
78
+ getVersion(): string;
79
+ getDependencies(): MigrationClassType10[];
80
+ }
81
+ export { Migration20251225182641319, Migration20251225182641316, Migration20251225182641314, Migration20251225182641312, Migration20251225182641310, Migration20251225182641307, Migration20251225182641305, Migration20251225182641303, Migration20251225182641300, Migration20251225182641298 };