Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.82 KB | None | 0 0
  1. enum banType
  2. {
  3. USER
  4. IP
  5. MACHINE
  6. }
  7.  
  8. enum banStatus
  9. {
  10. BANNED
  11. APPEALING
  12. REJECTED
  13. }
  14.  
  15. enum roomType
  16. {
  17. PUBLIC
  18. LOCKED
  19. PASSWORD
  20. HIDDEN
  21. }
  22.  
  23. enum Gender
  24. {
  25. M
  26. F
  27. }
  28.  
  29. enum FurniType
  30. {
  31. FLOOR
  32. WALL
  33. }
  34.  
  35. enum CatalogPageLayout {
  36. DEFAULT,
  37. FRONTPAGE,
  38. CLUB_BUY,
  39. CLUB_GIFT,
  40. RECYCLER,
  41. RECYCLER_INFO,
  42. RECYCLER_PRIZES,
  43. TROPHIES,
  44. PLASTO,
  45. MARKETPLACE,
  46. MARKETPLACE_OWN_ITEMS,
  47. PETS,
  48. SPACES,
  49. SOUNDMACHINE,
  50. GUILDS,
  51. INFO_DUCKETS,
  52. INFO_RENTABLES,
  53. INFO_PETS,
  54. ROOMADS,
  55. SINGLE_BUNDLE,
  56. SOLD_LTD_ITEMS,
  57. BADGE_DISPLAY,
  58. BOTS
  59. }
  60.  
  61. type Ban @pgTable(name: "bans")
  62. {
  63. id: ID! @id
  64. reason: String
  65. status: banStatus
  66. type: banType
  67. user: Int
  68. ip: String
  69. machine: String
  70. by: Int
  71. createdAt: DateTime @createdAt
  72. updatedAt: DateTime @updatedAt
  73. }
  74.  
  75. type Badge @pgTable(name: "badges")
  76. {
  77. id: ID! @id
  78. code: String! @unique
  79. description: String
  80. }
  81.  
  82. type Bot @pgTable(name: "bots")
  83. {
  84. id: ID! @id
  85. name: String
  86. motto: String
  87. inventory: Boolean
  88. owner: Int
  89. gender: Boolean
  90. figure: String
  91. type: String
  92. state: [String] @scalarList(strategy: RELATION)
  93. action: [String] @scalarList(strategy: RELATION)
  94. position: [Int] @scalarList(strategy: RELATION)
  95. messages: String
  96. chatBubble: Int
  97. chatAuto: Int
  98. chatRandom: Boolean
  99. chatDelay: Int @default(value: 4)
  100. }
  101.  
  102. # type Soundtracks @pgTable(name: "soundtracks") {
  103.  
  104. # }
  105.  
  106. # @TODO: Create relation between CatalogPages (link -> id)
  107. type CatalogFeatured @pgTable(name: "catalog_featured")
  108. {
  109. id: ID! @id
  110. caption: String
  111. image: String
  112. link: CatalogPage
  113. slot: Int
  114. updated: DateTime @updatedAt
  115. }
  116.  
  117. type CatalogPage @pgTable(name: "catalog_pages")
  118. {
  119. id: ID! @id
  120. link: String! @unique
  121. parent: CatalogPage
  122. layout: CatalogPageLayout @default(value: DEFAULT)
  123. order: Int
  124. name: String
  125. language: Language
  126. description: String
  127. icon: String
  128. banner: String
  129. teaser: String
  130. visible: Boolean @default(value: true)
  131. enabled: Boolean @default(value: true)
  132. rank: Int @default(value: 1)
  133. club: Boolean @default(value: false)
  134. vip: Boolean @default(value: false)
  135. body: Json
  136. product: Json
  137. }
  138.  
  139. type Rank @pgTable(name: "ranks")
  140. {
  141. id: ID! @id
  142. order: Int!
  143. name: String!
  144. }
  145.  
  146. type Language @pgTable(name: "languages")
  147. {
  148. id: ID! @id
  149. name: String
  150. native: String
  151. code: String! @unique
  152. enabled: Boolean @default(value: true)
  153. }
  154.  
  155. # type CatalogBundle @pgTable(name: "catalog_bundle")
  156. # {
  157. # id: ID! @id
  158. # items: {}[]
  159. # }
  160.  
  161. # type CatalogItem @pgTable(name: "catalog_items")
  162. # {
  163. # id: ID! @id
  164. # page: CatalogPage!
  165. # item: Item[]!
  166. # name: String
  167. # # price: Currencies
  168. # amount: Int
  169. # order: Int
  170. # badge: Badge
  171. # limited: Boolean
  172. # maximum: Int @default(value: -1)
  173. # stack: Boolean @default(value: true)
  174. # active: Boolean @default(value: true)
  175. # offer: Boolean @default(value: true)
  176. # clubOnly: Boolean
  177. # }
  178.  
  179. # DROP TABLE IF EXISTS `catalog_items`;
  180. # CREATE TABLE IF NOT EXISTS `catalog_items` (
  181. # `id` int(11) NOT NULL AUTO_INCREMENT,
  182. # `page_id` int(11) NOT NULL,
  183. # `item_ids` varchar(256) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  184. # `catalog_name` varchar(40) NOT NULL,
  185. # `cost_credits` int(11) NOT NULL DEFAULT '5',
  186. # `cost_points` int(11) NOT NULL DEFAULT '0',
  187. # `points_type` int(3) NOT NULL DEFAULT '0',
  188. # `amount` int(3) NOT NULL DEFAULT '1',
  189. # `song_id` int(3) unsigned NOT NULL DEFAULT '0',
  190. # `limited_stack` int(5) NOT NULL DEFAULT '0',
  191. # `limited_sells` int(5) NOT NULL DEFAULT '0',
  192. # `extradata` varchar(256) NOT NULL DEFAULT '',
  193. # `club_only` enum('0','1') NOT NULL DEFAULT '0',
  194. # `have_offer` enum('0','1') NOT NULL DEFAULT '1',
  195. # `offer_id` int(11) DEFAULT NULL,
  196. # PRIMARY KEY (`id`)
  197. # ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8413 ;
  198.  
  199. type Chatlog @pgTable(name: "chatlog")
  200. {
  201. id: ID! @id
  202. habbo: Habbo!
  203. room: Room!
  204. message: String
  205. createdAt: DateTime @createdAt
  206. }
  207.  
  208. type ChatlogConsole @pgTable(name: "chatlogs_console")
  209. {
  210. id: ID! @id
  211. from: Habbo! @relation(name: "ChatlogsConsoleFromUser")
  212. to: Habbo! @relation(name: "ChatlogsConsoleToUser")
  213. message: String
  214. createdAt: DateTime @createdAt
  215. }
  216.  
  217. type ChatlogConsoleInvitations @pgTable(name: "chatlogs_console_invitations")
  218. {
  219. id: ID! @id
  220. from: Habbo! @relation(name: "ChatlogsConsoleInvitationsFromUser")
  221. to: Habbo! @relation(name: "ChatlogsConsoleInvitationsToUser")
  222. message: String
  223. room: Room!
  224. createdAt: DateTime @createdAt
  225. }
  226.  
  227. type Room @pgTable(name: "rooms")
  228. {
  229. id: ID! @id
  230. name: String!
  231. description: String
  232. type: roomType @default(value: PUBLIC)
  233. category: Int
  234. owner: Habbo
  235. map: Json
  236. floorThickness: Float
  237. wallThickness: Float
  238. wallHeight: Float
  239. hideWalls: Boolean @default(value: false)
  240. hideWired: Boolean @default(value: false)
  241. currentUsers: Int @default(value: 0)
  242. maxUsers: Int @default(value: 10)
  243. allowPets: Boolean @default(value: false)
  244. allowPetsEating: Boolean @default(value: false)
  245. # rights: [User] @scalarList(strategy: RELATION)
  246. # items: [Item] @relation(name: "Items", onDelete: CASCADE)
  247. }
  248.  
  249.  
  250. # Furniture (Class) -> Catalog Item (Instance where its displayed on the catalog) -> Item (Instance with a User as the owner)
  251. # type Item @pgTable(name: "items")
  252. # {
  253. # id: ID! @id
  254. # name: String
  255. # public: String
  256. # type
  257. # createdAt: DateTime @createdAt
  258. # updatedAt: DateTime @updatedAt
  259. # }
  260.  
  261. # type Currencies {
  262. # id: ID! @id
  263. # name: String!
  264. # value: Int
  265. # }
  266.  
  267. type NavigatorTab @pgTable(name: "navigator_tabs")
  268. {
  269. id: ID! @id
  270. name: String
  271. order: Int
  272. language: Language
  273. categories: [NavigatorCategory!]!
  274. }
  275.  
  276. type NavigatorCategory @pgTable(name: "navigator_categories")
  277. {
  278. id: ID! @id
  279. name: String
  280. order: Int @unqiue
  281. parent: NavigatorTab
  282. }
  283.  
  284. type News @pgTable(name: "news")
  285. {
  286. id: ID! @id
  287. title: String
  288. summary: String
  289. body: String
  290. image: String
  291. author: User
  292. createdAt: DateTime @createdAt
  293. updatedAt: DateTime @updatedAt
  294. }
  295.  
  296. type Habbo @pgTable(name: "habbos")
  297. {
  298. id: ID! @id
  299. user: User!
  300. username: String! @unique
  301. motto: String
  302. gender: Gender
  303. figure: String
  304. rank: Int
  305. vip: Int
  306. online: Boolean
  307. verified: Int
  308. home: Int
  309. volume: Int
  310. appearOffline: Boolean @default(value: false)
  311. allowTrade: Boolean @default(value: true)
  312. allowGifts: Boolean @default(value: true)
  313. allowMimic: Boolean @default(value: true)
  314. allowFollow: Boolean @default(value: true)
  315. allowWhisper: Boolean @default(value: true)
  316. allowFriendRequests: Boolean @default(value: true)
  317. allowBotSpeech: Boolean @default(value: true)
  318. allowPetSpeech: Boolean @default(value: true)
  319. createdAt: DateTime @createdAt
  320. updatedAt: DateTime @updatedAt
  321. }
  322.  
  323. type User @pgTable(name: "users")
  324. {
  325. id: ID! @id
  326. email: String
  327. password: String
  328. pin: Int
  329. habbos: [Habbo!]!
  330. createdAt: DateTime @createdAt
  331. updatedAt: DateTime @updatedAt
  332. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement