0000_snapshot.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  1. {
  2. "id": "9b5cec8c-8b59-4d7a-bb5c-76ade1c83d6f",
  3. "prevId": "00000000-0000-0000-0000-000000000000",
  4. "version": "7",
  5. "dialect": "postgresql",
  6. "tables": {
  7. "public.billing": {
  8. "name": "billing",
  9. "schema": "",
  10. "columns": {
  11. "id": {
  12. "name": "id",
  13. "type": "varchar(30)",
  14. "primaryKey": false,
  15. "notNull": true
  16. },
  17. "workspace_id": {
  18. "name": "workspace_id",
  19. "type": "varchar(30)",
  20. "primaryKey": false,
  21. "notNull": true
  22. },
  23. "time_created": {
  24. "name": "time_created",
  25. "type": "timestamp with time zone",
  26. "primaryKey": false,
  27. "notNull": true,
  28. "default": "now()"
  29. },
  30. "time_deleted": {
  31. "name": "time_deleted",
  32. "type": "timestamp with time zone",
  33. "primaryKey": false,
  34. "notNull": false
  35. },
  36. "customer_id": {
  37. "name": "customer_id",
  38. "type": "varchar(255)",
  39. "primaryKey": false,
  40. "notNull": false
  41. },
  42. "payment_method_id": {
  43. "name": "payment_method_id",
  44. "type": "varchar(255)",
  45. "primaryKey": false,
  46. "notNull": false
  47. },
  48. "payment_method_last4": {
  49. "name": "payment_method_last4",
  50. "type": "varchar(4)",
  51. "primaryKey": false,
  52. "notNull": false
  53. },
  54. "balance": {
  55. "name": "balance",
  56. "type": "bigint",
  57. "primaryKey": false,
  58. "notNull": true
  59. },
  60. "reload": {
  61. "name": "reload",
  62. "type": "boolean",
  63. "primaryKey": false,
  64. "notNull": false
  65. }
  66. },
  67. "indexes": {},
  68. "foreignKeys": {
  69. "billing_workspace_id_workspace_id_fk": {
  70. "name": "billing_workspace_id_workspace_id_fk",
  71. "tableFrom": "billing",
  72. "tableTo": "workspace",
  73. "columnsFrom": [
  74. "workspace_id"
  75. ],
  76. "columnsTo": [
  77. "id"
  78. ],
  79. "onDelete": "no action",
  80. "onUpdate": "no action"
  81. }
  82. },
  83. "compositePrimaryKeys": {
  84. "billing_workspace_id_id_pk": {
  85. "name": "billing_workspace_id_id_pk",
  86. "columns": [
  87. "workspace_id",
  88. "id"
  89. ]
  90. }
  91. },
  92. "uniqueConstraints": {},
  93. "policies": {},
  94. "checkConstraints": {},
  95. "isRLSEnabled": false
  96. },
  97. "public.payment": {
  98. "name": "payment",
  99. "schema": "",
  100. "columns": {
  101. "id": {
  102. "name": "id",
  103. "type": "varchar(30)",
  104. "primaryKey": false,
  105. "notNull": true
  106. },
  107. "workspace_id": {
  108. "name": "workspace_id",
  109. "type": "varchar(30)",
  110. "primaryKey": false,
  111. "notNull": true
  112. },
  113. "time_created": {
  114. "name": "time_created",
  115. "type": "timestamp with time zone",
  116. "primaryKey": false,
  117. "notNull": true,
  118. "default": "now()"
  119. },
  120. "time_deleted": {
  121. "name": "time_deleted",
  122. "type": "timestamp with time zone",
  123. "primaryKey": false,
  124. "notNull": false
  125. },
  126. "customer_id": {
  127. "name": "customer_id",
  128. "type": "varchar(255)",
  129. "primaryKey": false,
  130. "notNull": false
  131. },
  132. "payment_id": {
  133. "name": "payment_id",
  134. "type": "varchar(255)",
  135. "primaryKey": false,
  136. "notNull": false
  137. },
  138. "amount": {
  139. "name": "amount",
  140. "type": "bigint",
  141. "primaryKey": false,
  142. "notNull": true
  143. }
  144. },
  145. "indexes": {},
  146. "foreignKeys": {
  147. "payment_workspace_id_workspace_id_fk": {
  148. "name": "payment_workspace_id_workspace_id_fk",
  149. "tableFrom": "payment",
  150. "tableTo": "workspace",
  151. "columnsFrom": [
  152. "workspace_id"
  153. ],
  154. "columnsTo": [
  155. "id"
  156. ],
  157. "onDelete": "no action",
  158. "onUpdate": "no action"
  159. }
  160. },
  161. "compositePrimaryKeys": {
  162. "payment_workspace_id_id_pk": {
  163. "name": "payment_workspace_id_id_pk",
  164. "columns": [
  165. "workspace_id",
  166. "id"
  167. ]
  168. }
  169. },
  170. "uniqueConstraints": {},
  171. "policies": {},
  172. "checkConstraints": {},
  173. "isRLSEnabled": false
  174. },
  175. "public.usage": {
  176. "name": "usage",
  177. "schema": "",
  178. "columns": {
  179. "id": {
  180. "name": "id",
  181. "type": "varchar(30)",
  182. "primaryKey": false,
  183. "notNull": true
  184. },
  185. "workspace_id": {
  186. "name": "workspace_id",
  187. "type": "varchar(30)",
  188. "primaryKey": false,
  189. "notNull": true
  190. },
  191. "time_created": {
  192. "name": "time_created",
  193. "type": "timestamp with time zone",
  194. "primaryKey": false,
  195. "notNull": true,
  196. "default": "now()"
  197. },
  198. "time_deleted": {
  199. "name": "time_deleted",
  200. "type": "timestamp with time zone",
  201. "primaryKey": false,
  202. "notNull": false
  203. },
  204. "request_id": {
  205. "name": "request_id",
  206. "type": "varchar(255)",
  207. "primaryKey": false,
  208. "notNull": false
  209. },
  210. "model": {
  211. "name": "model",
  212. "type": "varchar(255)",
  213. "primaryKey": false,
  214. "notNull": true
  215. },
  216. "input_tokens": {
  217. "name": "input_tokens",
  218. "type": "integer",
  219. "primaryKey": false,
  220. "notNull": true
  221. },
  222. "output_tokens": {
  223. "name": "output_tokens",
  224. "type": "integer",
  225. "primaryKey": false,
  226. "notNull": true
  227. },
  228. "reasoning_tokens": {
  229. "name": "reasoning_tokens",
  230. "type": "integer",
  231. "primaryKey": false,
  232. "notNull": false
  233. },
  234. "cache_read_tokens": {
  235. "name": "cache_read_tokens",
  236. "type": "integer",
  237. "primaryKey": false,
  238. "notNull": false
  239. },
  240. "cache_write_tokens": {
  241. "name": "cache_write_tokens",
  242. "type": "integer",
  243. "primaryKey": false,
  244. "notNull": false
  245. },
  246. "cost": {
  247. "name": "cost",
  248. "type": "bigint",
  249. "primaryKey": false,
  250. "notNull": true
  251. }
  252. },
  253. "indexes": {},
  254. "foreignKeys": {
  255. "usage_workspace_id_workspace_id_fk": {
  256. "name": "usage_workspace_id_workspace_id_fk",
  257. "tableFrom": "usage",
  258. "tableTo": "workspace",
  259. "columnsFrom": [
  260. "workspace_id"
  261. ],
  262. "columnsTo": [
  263. "id"
  264. ],
  265. "onDelete": "no action",
  266. "onUpdate": "no action"
  267. }
  268. },
  269. "compositePrimaryKeys": {
  270. "usage_workspace_id_id_pk": {
  271. "name": "usage_workspace_id_id_pk",
  272. "columns": [
  273. "workspace_id",
  274. "id"
  275. ]
  276. }
  277. },
  278. "uniqueConstraints": {},
  279. "policies": {},
  280. "checkConstraints": {},
  281. "isRLSEnabled": false
  282. },
  283. "public.user": {
  284. "name": "user",
  285. "schema": "",
  286. "columns": {
  287. "id": {
  288. "name": "id",
  289. "type": "varchar(30)",
  290. "primaryKey": false,
  291. "notNull": true
  292. },
  293. "workspace_id": {
  294. "name": "workspace_id",
  295. "type": "varchar(30)",
  296. "primaryKey": false,
  297. "notNull": true
  298. },
  299. "time_created": {
  300. "name": "time_created",
  301. "type": "timestamp with time zone",
  302. "primaryKey": false,
  303. "notNull": true,
  304. "default": "now()"
  305. },
  306. "time_deleted": {
  307. "name": "time_deleted",
  308. "type": "timestamp with time zone",
  309. "primaryKey": false,
  310. "notNull": false
  311. },
  312. "email": {
  313. "name": "email",
  314. "type": "text",
  315. "primaryKey": false,
  316. "notNull": true
  317. },
  318. "name": {
  319. "name": "name",
  320. "type": "varchar(255)",
  321. "primaryKey": false,
  322. "notNull": true
  323. },
  324. "time_seen": {
  325. "name": "time_seen",
  326. "type": "timestamp with time zone",
  327. "primaryKey": false,
  328. "notNull": false
  329. },
  330. "color": {
  331. "name": "color",
  332. "type": "integer",
  333. "primaryKey": false,
  334. "notNull": false
  335. }
  336. },
  337. "indexes": {
  338. "user_email": {
  339. "name": "user_email",
  340. "columns": [
  341. {
  342. "expression": "workspace_id",
  343. "isExpression": false,
  344. "asc": true,
  345. "nulls": "last"
  346. },
  347. {
  348. "expression": "email",
  349. "isExpression": false,
  350. "asc": true,
  351. "nulls": "last"
  352. }
  353. ],
  354. "isUnique": true,
  355. "concurrently": false,
  356. "method": "btree",
  357. "with": {}
  358. }
  359. },
  360. "foreignKeys": {
  361. "user_workspace_id_workspace_id_fk": {
  362. "name": "user_workspace_id_workspace_id_fk",
  363. "tableFrom": "user",
  364. "tableTo": "workspace",
  365. "columnsFrom": [
  366. "workspace_id"
  367. ],
  368. "columnsTo": [
  369. "id"
  370. ],
  371. "onDelete": "no action",
  372. "onUpdate": "no action"
  373. }
  374. },
  375. "compositePrimaryKeys": {
  376. "user_workspace_id_id_pk": {
  377. "name": "user_workspace_id_id_pk",
  378. "columns": [
  379. "workspace_id",
  380. "id"
  381. ]
  382. }
  383. },
  384. "uniqueConstraints": {},
  385. "policies": {},
  386. "checkConstraints": {},
  387. "isRLSEnabled": false
  388. },
  389. "public.workspace": {
  390. "name": "workspace",
  391. "schema": "",
  392. "columns": {
  393. "id": {
  394. "name": "id",
  395. "type": "varchar(30)",
  396. "primaryKey": true,
  397. "notNull": true
  398. },
  399. "slug": {
  400. "name": "slug",
  401. "type": "varchar(255)",
  402. "primaryKey": false,
  403. "notNull": false
  404. },
  405. "name": {
  406. "name": "name",
  407. "type": "varchar(255)",
  408. "primaryKey": false,
  409. "notNull": false
  410. },
  411. "time_created": {
  412. "name": "time_created",
  413. "type": "timestamp with time zone",
  414. "primaryKey": false,
  415. "notNull": true,
  416. "default": "now()"
  417. },
  418. "time_deleted": {
  419. "name": "time_deleted",
  420. "type": "timestamp with time zone",
  421. "primaryKey": false,
  422. "notNull": false
  423. }
  424. },
  425. "indexes": {
  426. "slug": {
  427. "name": "slug",
  428. "columns": [
  429. {
  430. "expression": "slug",
  431. "isExpression": false,
  432. "asc": true,
  433. "nulls": "last"
  434. }
  435. ],
  436. "isUnique": true,
  437. "concurrently": false,
  438. "method": "btree",
  439. "with": {}
  440. }
  441. },
  442. "foreignKeys": {},
  443. "compositePrimaryKeys": {},
  444. "uniqueConstraints": {},
  445. "policies": {},
  446. "checkConstraints": {},
  447. "isRLSEnabled": false
  448. }
  449. },
  450. "enums": {},
  451. "schemas": {},
  452. "sequences": {},
  453. "roles": {},
  454. "policies": {},
  455. "views": {},
  456. "_meta": {
  457. "columns": {},
  458. "schemas": {},
  459. "tables": {}
  460. }
  461. }