schema.prisma 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. generator client {
  2. provider = "prisma-client"
  3. output = "../generated/prisma"
  4. }
  5. datasource db {
  6. provider = "mongodb"
  7. url = env("MONGO_URI")
  8. }
  9. type ActivitiesSnapshot {
  10. /// Field referred in an index, but found no data to define the type.
  11. username Json?
  12. }
  13. type AiassistantsGrantedGroupsForAccessScope {
  14. /// Field referred in an index, but found no data to define the type.
  15. item Json?
  16. }
  17. type AiassistantsGrantedGroupsForShareScope {
  18. /// Field referred in an index, but found no data to define the type.
  19. item Json?
  20. }
  21. type PageoperationsExPage {
  22. /// Field referred in an index, but found no data to define the type.
  23. id Json? @map("_id")
  24. /// Field referred in an index, but found no data to define the type.
  25. path Json?
  26. }
  27. type PageoperationsPage {
  28. /// Field referred in an index, but found no data to define the type.
  29. id Json? @map("_id")
  30. /// Field referred in an index, but found no data to define the type.
  31. path Json?
  32. }
  33. type PagesGrantedGroups {
  34. /// Field referred in an index, but found no data to define the type.
  35. item Json?
  36. }
  37. model accesstokens {
  38. id String @id @default(auto()) @map("_id") @db.ObjectId
  39. /// Field referred in an index, but found no data to define the type.
  40. expiredAt Json?
  41. /// Field referred in an index, but found no data to define the type.
  42. tokenHash Json? @unique(map: "tokenHash_1")
  43. @@index([expiredAt], map: "expiredAt_1")
  44. }
  45. model activities {
  46. id String @id @default(auto()) @map("_id") @db.ObjectId
  47. /// Field referred in an index, but found no data to define the type.
  48. action Json?
  49. /// Field referred in an index, but found no data to define the type.
  50. createdAt Json?
  51. /// Field referred in an index, but found no data to define the type.
  52. snapshot ActivitiesSnapshot?
  53. /// Field referred in an index, but found no data to define the type.
  54. target Json?
  55. /// Field referred in an index, but found no data to define the type.
  56. user Json?
  57. @@unique([user, target, action, createdAt], map: "user_1_target_1_action_1_createdAt_1")
  58. @@index([user], map: "user_1")
  59. @@index([snapshot.username], map: "snapshot.username_1")
  60. @@index([target, action], map: "target_1_action_1")
  61. @@index([createdAt], map: "createdAt_1")
  62. }
  63. model aiassistants {
  64. id String @id @default(auto()) @map("_id") @db.ObjectId
  65. /// Field referred in an index, but found no data to define the type.
  66. grantedGroupsForAccessScope AiassistantsGrantedGroupsForAccessScope?
  67. /// Field referred in an index, but found no data to define the type.
  68. grantedGroupsForShareScope AiassistantsGrantedGroupsForShareScope?
  69. @@index([grantedGroupsForShareScope.item], map: "grantedGroupsForShareScope.item_1")
  70. @@index([grantedGroupsForAccessScope.item], map: "grantedGroupsForAccessScope.item_1")
  71. }
  72. model attachments {
  73. id String @id @default(auto()) @map("_id") @db.ObjectId
  74. /// Field referred in an index, but found no data to define the type.
  75. creator Json?
  76. /// Field referred in an index, but found no data to define the type.
  77. fileName Json? @unique(map: "fileName_1")
  78. /// Field referred in an index, but found no data to define the type.
  79. page Json?
  80. @@index([page], map: "page_1")
  81. @@index([creator], map: "creator_1")
  82. }
  83. model bookmarks {
  84. id String @id @default(auto()) @map("_id") @db.ObjectId
  85. /// Field referred in an index, but found no data to define the type.
  86. page Json?
  87. /// Field referred in an index, but found no data to define the type.
  88. user Json?
  89. @@unique([page, user], map: "page_1_user_1")
  90. @@index([page], map: "page_1")
  91. @@index([user], map: "user_1")
  92. }
  93. model comments {
  94. id String @id @default(auto()) @map("_id") @db.ObjectId
  95. /// Field referred in an index, but found no data to define the type.
  96. creator Json?
  97. /// Field referred in an index, but found no data to define the type.
  98. page Json?
  99. /// Field referred in an index, but found no data to define the type.
  100. revision Json?
  101. @@index([page], map: "page_1")
  102. @@index([creator], map: "creator_1")
  103. @@index([revision], map: "revision_1")
  104. }
  105. model configs {
  106. id String @id @default(auto()) @map("_id") @db.ObjectId
  107. v Int @map("__v")
  108. createdAt DateTime @db.Date
  109. key String @unique(map: "key_1")
  110. updatedAt DateTime @db.Date
  111. value String
  112. }
  113. model externalaccounts {
  114. id String @id @default(auto()) @map("_id") @db.ObjectId
  115. /// Field referred in an index, but found no data to define the type.
  116. accountId Json?
  117. /// Field referred in an index, but found no data to define the type.
  118. providerType Json?
  119. @@unique([providerType, accountId], map: "providerType_1_accountId_1")
  120. }
  121. model externalusergrouprelations {
  122. id String @id @default(auto()) @map("_id") @db.ObjectId
  123. }
  124. model externalusergroups {
  125. id String @id @default(auto()) @map("_id") @db.ObjectId
  126. /// Field referred in an index, but found no data to define the type.
  127. externalId Json? @unique(map: "externalId_1")
  128. /// Field referred in an index, but found no data to define the type.
  129. name Json?
  130. /// Field referred in an index, but found no data to define the type.
  131. parent Json?
  132. /// Field referred in an index, but found no data to define the type.
  133. provider Json?
  134. @@unique([name, provider], map: "name_1_provider_1")
  135. @@index([parent], map: "parent_1")
  136. }
  137. model failedemails {
  138. id String @id @default(auto()) @map("_id") @db.ObjectId
  139. /// Field referred in an index, but found no data to define the type.
  140. createdAt Json?
  141. @@index([createdAt], map: "createdAt_1")
  142. }
  143. model globalnotificationsettings {
  144. id String @id @default(auto()) @map("_id") @db.ObjectId
  145. }
  146. model growiplugins {
  147. id String @id @default(auto()) @map("_id") @db.ObjectId
  148. }
  149. model inappnotifications {
  150. id String @id @default(auto()) @map("_id") @db.ObjectId
  151. /// Field referred in an index, but found no data to define the type.
  152. action Json?
  153. /// Field referred in an index, but found no data to define the type.
  154. createdAt Json?
  155. /// Field referred in an index, but found no data to define the type.
  156. status Json?
  157. /// Field referred in an index, but found no data to define the type.
  158. target Json?
  159. /// Field referred in an index, but found no data to define the type.
  160. user Json?
  161. @@index([user], map: "user_1")
  162. @@index([status], map: "status_1")
  163. @@index([createdAt], map: "createdAt_1")
  164. @@index([user, target, action, createdAt], map: "user_1_target_1_action_1_createdAt_1")
  165. }
  166. model inappnotificationsettings {
  167. id String @id @default(auto()) @map("_id") @db.ObjectId
  168. }
  169. model migrations {
  170. id String @id @default(auto()) @map("_id") @db.ObjectId
  171. appliedAt DateTime @db.Date
  172. fileName String
  173. }
  174. model namedqueries {
  175. id String @id @default(auto()) @map("_id") @db.ObjectId
  176. v Int @map("__v")
  177. /// Could not determine type: the field only had null or empty values in the sample set.
  178. creator Json?
  179. delegatorName String
  180. name String @unique(map: "name_1")
  181. @@index([creator], map: "creator_1")
  182. }
  183. model pagebulkexportjobs {
  184. id String @id @default(auto()) @map("_id") @db.ObjectId
  185. }
  186. model pagebulkexportpagesnapshots {
  187. id String @id @default(auto()) @map("_id") @db.ObjectId
  188. }
  189. model pageoperations {
  190. id String @id @default(auto()) @map("_id") @db.ObjectId
  191. /// Field referred in an index, but found no data to define the type.
  192. actionStage Json?
  193. /// Field referred in an index, but found no data to define the type.
  194. actionType Json?
  195. /// Field referred in an index, but found no data to define the type.
  196. exPage PageoperationsExPage?
  197. /// Field referred in an index, but found no data to define the type.
  198. fromPath Json?
  199. /// Field referred in an index, but found no data to define the type.
  200. page PageoperationsPage?
  201. /// Field referred in an index, but found no data to define the type.
  202. toPath Json?
  203. @@index([actionType], map: "actionType_1")
  204. @@index([actionStage], map: "actionStage_1")
  205. @@index([fromPath], map: "fromPath_1")
  206. @@index([toPath], map: "toPath_1")
  207. @@index([page.id], map: "page._id_1")
  208. @@index([page.path], map: "page.path_1")
  209. @@index([exPage.id], map: "exPage._id_1")
  210. @@index([exPage.path], map: "exPage.path_1")
  211. }
  212. model pageredirects {
  213. id String @id @default(auto()) @map("_id") @db.ObjectId
  214. /// Field referred in an index, but found no data to define the type.
  215. fromPath Json? @unique(map: "fromPath_1")
  216. }
  217. model pages {
  218. id String @id @default(auto()) @map("_id") @db.ObjectId
  219. /// Field referred in an index, but found no data to define the type.
  220. createdAt Json?
  221. /// Field referred in an index, but found no data to define the type.
  222. creator Json?
  223. /// Field referred in an index, but found no data to define the type.
  224. grant Json?
  225. /// Field referred in an index, but found no data to define the type.
  226. grantedGroups PagesGrantedGroups?
  227. /// Field referred in an index, but found no data to define the type.
  228. parent Json?
  229. /// Field referred in an index, but found no data to define the type.
  230. path Json?
  231. /// Field referred in an index, but found no data to define the type.
  232. status Json?
  233. /// Field referred in an index, but found no data to define the type.
  234. ttlTimestamp Json?
  235. /// Field referred in an index, but found no data to define the type.
  236. updatedAt Json?
  237. @@index([parent], map: "parent_1")
  238. @@index([path], map: "path_1")
  239. @@index([status], map: "status_1")
  240. @@index([grant], map: "grant_1")
  241. @@index([grantedGroups.item], map: "grantedGroups.item_1")
  242. @@index([creator], map: "creator_1")
  243. @@index([createdAt], map: "createdAt_1")
  244. @@index([updatedAt], map: "updatedAt_1")
  245. @@index([ttlTimestamp], map: "ttlTimestamp_1")
  246. }
  247. model pagetagrelations {
  248. id String @id @default(auto()) @map("_id") @db.ObjectId
  249. /// Field referred in an index, but found no data to define the type.
  250. isPageTrashed Json?
  251. /// Field referred in an index, but found no data to define the type.
  252. relatedPage Json?
  253. /// Field referred in an index, but found no data to define the type.
  254. relatedTag Json?
  255. @@unique([relatedPage, relatedTag], map: "relatedPage_1_relatedTag_1")
  256. @@index([relatedPage], map: "relatedPage_1")
  257. @@index([relatedTag], map: "relatedTag_1")
  258. @@index([isPageTrashed], map: "isPageTrashed_1")
  259. }
  260. model passwordresetorders {
  261. id String @id @default(auto()) @map("_id") @db.ObjectId
  262. /// Field referred in an index, but found no data to define the type.
  263. token Json? @unique(map: "token_1")
  264. }
  265. model revisions {
  266. id String @id @default(auto()) @map("_id") @db.ObjectId
  267. /// Field referred in an index, but found no data to define the type.
  268. pageId Json?
  269. @@index([pageId], map: "pageId_1")
  270. }
  271. model rlflx {
  272. id String @id @default(auto()) @map("_id") @db.ObjectId
  273. /// Field referred in an index, but found no data to define the type.
  274. expire Json?
  275. /// Field referred in an index, but found no data to define the type.
  276. key Json? @unique(map: "key_1")
  277. @@index([expire(sort: Desc)], map: "expire_-1")
  278. }
  279. model sessions {
  280. id String @id @map("_id")
  281. expires DateTime @db.Date
  282. session String
  283. @@index([expires], map: "expires_1")
  284. }
  285. model sharelinks {
  286. id String @id @default(auto()) @map("_id") @db.ObjectId
  287. /// Field referred in an index, but found no data to define the type.
  288. relatedPage Json?
  289. @@index([relatedPage], map: "relatedPage_1")
  290. }
  291. model slackappintegrations {
  292. id String @id @default(auto()) @map("_id") @db.ObjectId
  293. /// Field referred in an index, but found no data to define the type.
  294. isPrimary Json? @unique(map: "isPrimary_1")
  295. /// Field referred in an index, but found no data to define the type.
  296. tokenGtoP Json? @unique(map: "tokenGtoP_1")
  297. /// Field referred in an index, but found no data to define the type.
  298. tokenPtoG Json? @unique(map: "tokenPtoG_1")
  299. }
  300. model subscriptions {
  301. id String @id @default(auto()) @map("_id") @db.ObjectId
  302. /// Field referred in an index, but found no data to define the type.
  303. user Json?
  304. @@index([user], map: "user_1")
  305. }
  306. model tags {
  307. id String @id @default(auto()) @map("_id") @db.ObjectId
  308. /// Field referred in an index, but found no data to define the type.
  309. name Json? @unique(map: "name_1")
  310. }
  311. model threadrelations {
  312. id String @id @default(auto()) @map("_id") @db.ObjectId
  313. /// Field referred in an index, but found no data to define the type.
  314. threadId Json? @unique(map: "threadId_1")
  315. }
  316. model transferkeys {
  317. id String @id @default(auto()) @map("_id") @db.ObjectId
  318. /// Field referred in an index, but found no data to define the type.
  319. expireAt Json?
  320. /// Field referred in an index, but found no data to define the type.
  321. key Json? @unique(map: "key_1")
  322. /// Field referred in an index, but found no data to define the type.
  323. keyString Json? @unique(map: "keyString_1")
  324. @@index([expireAt], map: "expireAt_1")
  325. }
  326. model updateposts {
  327. id String @id @default(auto()) @map("_id") @db.ObjectId
  328. /// Field referred in an index, but found no data to define the type.
  329. creator Json?
  330. @@index([creator], map: "creator_1")
  331. }
  332. model usergrouprelations {
  333. id String @id @default(auto()) @map("_id") @db.ObjectId
  334. }
  335. model usergroups {
  336. id String @id @default(auto()) @map("_id") @db.ObjectId
  337. /// Field referred in an index, but found no data to define the type.
  338. name Json? @unique(map: "name_1")
  339. /// Field referred in an index, but found no data to define the type.
  340. parent Json?
  341. @@index([parent], map: "parent_1")
  342. }
  343. model userregistrationorders {
  344. id String @id @default(auto()) @map("_id") @db.ObjectId
  345. /// Field referred in an index, but found no data to define the type.
  346. token Json? @unique(map: "token_1")
  347. }
  348. model users {
  349. id String @id @default(auto()) @map("_id") @db.ObjectId
  350. /// Field referred in an index, but found no data to define the type.
  351. admin Json?
  352. /// Field referred in an index, but found no data to define the type.
  353. apiToken Json?
  354. /// Field referred in an index, but found no data to define the type.
  355. email Json? @unique(map: "email_1")
  356. /// Field referred in an index, but found no data to define the type.
  357. lastLoginAt Json?
  358. /// Field referred in an index, but found no data to define the type.
  359. name Json?
  360. /// Field referred in an index, but found no data to define the type.
  361. slackMemberId Json? @unique(map: "slackMemberId_1")
  362. /// Field referred in an index, but found no data to define the type.
  363. status Json?
  364. /// Field referred in an index, but found no data to define the type.
  365. username Json? @unique(map: "username_1")
  366. @@index([name], map: "name_1")
  367. @@index([apiToken], map: "apiToken_1")
  368. @@index([status], map: "status_1")
  369. @@index([lastLoginAt], map: "lastLoginAt_1")
  370. @@index([admin], map: "admin_1")
  371. }
  372. model useruisettings {
  373. id String @id @default(auto()) @map("_id") @db.ObjectId
  374. /// Field referred in an index, but found no data to define the type.
  375. user Json? @unique(map: "user_1")
  376. }
  377. model vectorstorefilerelations {
  378. id String @id @default(auto()) @map("_id") @db.ObjectId
  379. /// Field referred in an index, but found no data to define the type.
  380. attachment Json?
  381. /// Field referred in an index, but found no data to define the type.
  382. page Json?
  383. /// Field referred in an index, but found no data to define the type.
  384. vectorStoreRelationId Json?
  385. @@unique([vectorStoreRelationId, page, attachment], map: "vectorStoreRelationId_1_page_1_attachment_1")
  386. }
  387. model vectorstores {
  388. id String @id @default(auto()) @map("_id") @db.ObjectId
  389. /// Field referred in an index, but found no data to define the type.
  390. vectorStoreId Json? @unique(map: "vectorStoreId_1")
  391. }
  392. model yjs_writings {
  393. id String @id @default(auto()) @map("_id") @db.ObjectId
  394. /// Field referred in an index, but found no data to define the type.
  395. action Json?
  396. /// Field referred in an index, but found no data to define the type.
  397. clock Json?
  398. /// Field referred in an index, but found no data to define the type.
  399. docName Json?
  400. /// Field referred in an index, but found no data to define the type.
  401. metaKey Json?
  402. /// Field referred in an index, but found no data to define the type.
  403. part Json?
  404. /// Field referred in an index, but found no data to define the type.
  405. version Json?
  406. @@index([version, docName, action, clock, part], map: "version_1_docName_1_action_1_clock_1_part_1")
  407. @@index([version, docName, metaKey], map: "version_1_docName_1_metaKey_1")
  408. @@index([docName, clock], map: "docName_1_clock_1")
  409. @@map("yjs-writings")
  410. }