Advertisement
Guest User

Untitled

a guest
Jul 13th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.57 KB | None | 0 0
  1. MERGE (courier:DeliveryType {name: "Courier"})
  2. MERGE (pickup:DeliveryType {name: "Pickup"})
  3.  
  4. MERGE (hkAvia:DeliveryService {name: "HK Avia"})
  5. MERGE (hkBarge:DeliveryService {name: "HK Barge"})
  6. MERGE (ups:DeliveryService {name: "UPS"})
  7. MERGE (internalDelivery:DeliveryService {name: "Our Internal Delivery Service"})
  8. MERGE (ups)-[:BELONGS_TO]->(courier)
  9.  
  10. MERGE (markersCategory:GoodCategory {title: "Markers", url: "/markers/"})
  11. MERGE (elerktronikaCategory:GoodCategory {title: "Elektronika", url: "/markers/elektronika/"})
  12. MERGE (otherCategory:GoodCategory {title: "Other", url: "/others/"})
  13. MERGE (elerktronikaCategory)-[:INCLUDED_IN]->(markersCategory)
  14.  
  15. MERGE (russia:Location {name: "Russian Federation"})
  16. MERGE (hk:Location {name: "Hong Kong"})
  17. MERGE (lithuania:Location {name: "Lithuania"})
  18.  
  19. MERGE (moscow:Location {name: "Moscow"})
  20. MERGE (moscow)-[:INSIDE]->(russia)
  21.  
  22. MERGE (moscowPark:Location {name: "Moscow Park"})
  23. MERGE (moscowPark)-[:INSIDE]->(moscow)
  24.  
  25. MERGE (systemLithuaniaWarehouse:Location {name: "System's Lithuania Warehouse"})
  26. MERGE (systemLithuaniaWarehouse)-[:INSIDE]->(lithuania)
  27.  
  28. MERGE (systemMoscowWarehouse:Location {name: "System's Moscow Warehouse"})
  29. MERGE (systemMoscowWarehouse)-[:INSIDE]->(moscow)
  30. MERGE (systemMoscowWarehouse)-[:BELONGS_TO]->(pickup)
  31.  
  32. MERGE (sellerWarehouse:Location {name: "Seller's Warehouse"})
  33. MERGE (sellerWarehouse)-[:INSIDE]->(hk)
  34.  
  35. MERGE (buyerHome:Location {name: "Buyer's Home"})
  36. MERGE (buyerHome)-[:INSIDE]->(moscow)
  37.  
  38. MERGE (leg1:LogisticLeg {name: "HK-LITHUANIA WAREHOUSE", priceFormula: "i.amount * 10%"})
  39. MERGE (hk)-[:GO]->(leg1)
  40. MERGE (leg1)-[:GO]->(systemLithuaniaWarehouse)
  41. MERGE (leg1)-[:SERVES]->(markersCategory)
  42. MERGE (leg1)-[:SERVES]->(otherCategory)
  43. MERGE (leg1)-[:VIA]->(hkBarge)
  44.  
  45. MERGE (leg2:LogisticLeg {name: "LITHUANIA WAREHOUSE-MOSCOW WAREHOUSE", priceFormula: "i.amount * 15%"})
  46. MERGE (systemLithuaniaWarehouse)-[:GO]->(leg2)
  47. MERGE (leg2)-[:GO]->(systemMoscowWarehouse)
  48. MERGE (leg2)-[:SERVES]->(markersCategory)
  49. MERGE (leg2)-[:SERVES]->(otherCategory)
  50. MERGE (leg2)-[:VIA]->(internalDelivery)
  51.  
  52. MERGE (leg3:LogisticLeg {name: "MOSCOW WAREHOUSE-MOSCOW", priceFormula: "500"})
  53. MERGE (systemMoscowWarehouse)-[:GO]->(leg3)
  54. MERGE (leg3)-[:GO]->(moscow)
  55. MERGE (leg3)-[:SERVES]->(markersCategory)
  56. MERGE (leg3)-[:SERVES]->(otherCategory)
  57. MERGE (leg3)-[:VIA]->(ups)
  58.  
  59. MERGE (leg4:LogisticLeg {name: "HK-MOSCOW WAREHOUSE", priceFormula: "i.weight * 100"})
  60. MERGE (hk)-[:GO]->(leg4)
  61. MERGE (leg4)-[:GO]->(systemMoscowWarehouse)
  62. MERGE (leg4)-[:SERVES]->(otherCategory)
  63. MERGE (leg4)-[:VIA]->(hkAvia)
  64.  
  65. MERGE (admin:User {email: "admin@p8nt.ru", passwordHash: "$2a$10$.QmNWQTupmFA8BIKFBKoWuVC80lFxqy5AlHYQpTuzgAFMH6IvcU1G", role: "ADMIN"})
  66. MERGE (buyer:User {email: "buyer@p8nt.ru", passwordHash: "$2a$10$.QmNWQTupmFA8BIKFBKoWuVC80lFxqy5AlHYQpTuzgAFMH6IvcU1G", role: "USER"})
  67. MERGE (seller:User {email: "seller@p8nt.ru", passwordHash: "$2a$10$.QmNWQTupmFA8BIKFBKoWuVC80lFxqy5AlHYQpTuzgAFMH6IvcU1G", role: "USER"})
  68. MERGE (photographer:User {email: "photographer@p8nt.ru", passwordHash: "$2a$10$.QmNWQTupmFA8BIKFBKoWuVC80lFxqy5AlHYQpTuzgAFMH6IvcU1G", role: "USER"})
  69.  
  70. MERGE (adminBonus:BonusAccount {name: "adminBonus"})
  71. MERGE (admin)-[:OWNS {main: true}]->(adminBonus)
  72.  
  73. MERGE (buyerBonus:BonusAccount {name: "buyerBonus"})
  74. MERGE (buyer)-[:OWNS {main: true}]->(buyerBonus)
  75.  
  76. MERGE (sellerBonus:BonusAccount {name: "sellerBonus"})
  77. MERGE (seller)-[:OWNS {main: true}]->(sellerBonus)
  78.  
  79. MERGE (photographerBonus:BonusAccount {name: "photographerBonus"})
  80. MERGE (photographer)-[:OWNS {main: true}]->(photographerBonus)
  81.  
  82. MERGE (retail:UserSegment {name: "Retail"})
  83. MERGE (admin)-[:BELONGS_TO]->(retail)
  84. MERGE (seller)-[:BELONGS_TO]->(retail)
  85. MERGE (photographer)-[:BELONGS_TO]->(retail)
  86.  
  87. MERGE (wholesale:UserSegment {name: "Wholesale"})
  88. MERGE (buyer)-[:BELONGS_TO]->(wholesale)
  89.  
  90. MERGE (system:System {name: "SYSTEM"})
  91. MERGE (admin)-[:ADMIN]->(system)
  92.  
  93. MERGE (systemBonus:BonusAccount {name: "systemBonus"})
  94. MERGE (system)-[:OWNS {main: true}]->(systemBonus)
  95.  
  96. MERGE (systemTransfer:BonusAccount {name: "systemTransfer"})
  97. MERGE (system)-[:OWNS]->(systemTransfer)
  98.  
  99. MERGE (systemContragent:Contragent {name: "systemContragent"})
  100. MERGE (system)-[:OWNS {main: true}]->(systemContragent)
  101.  
  102. MERGE (systemBank:BankAccount {name: "systemBank", bank: "SBERBANK", number: "189239081293801283"})
  103. MERGE (systemContragent)-[:OWNS]->(systemBank)
  104.  
  105. MERGE (buyerContragent:Contragent {name: "buyerContragent"})
  106. MERGE (buyer)-[:OWNS]->(buyerContragent)
  107.  
  108. MERGE (buyerBank:BankAccount {name: "buyerBank", bank: "ALFA-BANK", number: "192030918723817237"})
  109. MERGE (buyerContragent)-[:OWNS]->(buyerBank)
  110.  
  111. MERGE (sellerContragent:Contragent {name: "sellerContragent"})
  112. MERGE (seller)-[:OWNS]->(sellerContragent)
  113.  
  114. MERGE (sellerBank:BankAccount {name: "sellerBank", bank: "ALFA-BANK", number: "1231231231235235234"})
  115. MERGE (sellerContragent)-[:OWNS]->(sellerBank)
  116.  
  117. MERGE (photographerContragent:Contragent {name: "photographerContragent"})
  118. MERGE (photographer)-[:OWNS]->(photographerContragent)
  119.  
  120. MERGE (photographerBank:BankAccount {name: "photographerBank", bank: "ALFA-BANK", number: "12893719207398712"})
  121. MERGE (photographerContragent)-[:OWNS]->(photographerBank)
  122.  
  123. MERGE (team:Team {name: "team"})
  124. MERGE (buyer)-[:LEADER]->(team)
  125. MERGE (admin)-[:MEMBER]->(team)
  126.  
  127. MERGE (imageFile330x220:File {url: "http://lorempixel.com/330/220/"})
  128. MERGE (imageFile800x600:File {url: "http://lorempixel.com/800/600/"})
  129. MERGE (imageFile100x100:File {url: "http://lorempixel.com/100/100/"})
  130.  
  131. MERGE (image:Image {description: "Lorem Image"})
  132. MERGE (photographer)-[:AUTHOR]->(image)
  133. MERGE (image)-[:SIZE {width: 100, height: 100}]->(imageFile100x100)
  134. MERGE (image)-[:SIZE {width: 330, height: 220}]->(imageFile330x220)
  135. MERGE (image)-[:SIZE {width: 800, height: 600}]->(imageFile800x600)
  136.  
  137. MERGE (tag1:Tag {name: "Marker"})
  138. MERGE (tag2:Tag {name: "FOO"})
  139. MERGE (tag3:Tag {name: "BAR"})
  140. MERGE (tag4:Tag {name: "BAZ"})
  141.  
  142. MERGE (marker:Good {title: "Marker", weight: 2000})
  143. MERGE (marker)-[:BELONGS_TO]->(elerktronikaCategory)
  144. MERGE (marker)-[:SHOWN_ON]->(image)
  145. MERGE (marker)-[:TAGGED_WITH]->(tag1)
  146. MERGE (marker)-[:TAGGED_WITH]->(tag2)
  147. MERGE (marker)-[:TAGGED_WITH]->(tag3)
  148. MERGE (marker)-[:TAGGED_WITH]->(tag4)
  149.  
  150. MERGE (offer:Offer {name: "Offer1"})
  151. MERGE (seller)-[:AUTHOR]->(offer)
  152.  
  153. MERGE (is1:ItemStatus {name: "is1", amount: 100, price: 100, currency: "USD", status: "Available", quality: "Best"})
  154. MERGE (offer)-[:REASON]->(is1)
  155. MERGE (is1)-[:LOCATED]->(sellerWarehouse)
  156. MERGE (is1)-[:OF]->(marker)
  157.  
  158. MERGE (buyerCart:Cart {name: "buyerCart"})
  159. MERGE (buyer)-[:OWNS]->(buyerCart)
  160.  
  161. MERGE (cartPosition1:CartPosition {name: "cartPosition1", amount: 10})
  162. MERGE (image)-[:LEAD]->(cartPosition1)
  163. MERGE (buyerCart)-[:INCLUDES]->(cartPosition1)
  164. MERGE (cartPosition1)-[:OF]->(is1)
  165.  
  166. MERGE (order:Order {name: "Order1"})
  167. MERGE (order)-[:TO]->(buyerHome)
  168. MERGE (buyer)-[:AUTHOR]->(order)
  169. MERGE (order)-[:OF]->(buyerCart)
  170.  
  171. MERGE (rubBonusRateOld:CurrencyRate {name: "RUB/BONUS", value: 56.6685, createdAt: 1436706000})
  172. MERGE (rubBonusRate:CurrencyRate {name: "RUB/BONUS", value: 56.6079, createdAt: 1436792989})
  173. MERGE (usdBonusRate:CurrencyRate {name: "USD/BONUS", value: 1, createdAt: 1436706000})
  174. MERGE (rubBonusRate)-[:OVERRIDES]->(rubBonusRateOld)
  175.  
  176. MERGE (ls1:LogisticSchema {name: "LogisticSchema1"})
  177. MERGE (ls1)-[:INCLUDES {position: 0, price: 1000, currency: "BONUS"}]->(leg1)
  178. MERGE (ls1)-[:INCLUDES {position: 1, price: 1500, currency: "BONUS"}]->(leg2)
  179. MERGE (ls1)-[:INCLUDES {position: 2, price: 500, currency: "BONUS"}]->(leg3)
  180.  
  181. MERGE (is2:ItemStatus {name: "is2", amount: 50, price: 200, currency: "BONUS", status: "Reserved", quality: "Best"})
  182. MERGE (is3:ItemStatus {name: "is3", amount: 50, price: 100, currency: "USD", status: "Available", quality: "Best"})
  183. MERGE (is2)-[:USING]->(ls1)
  184. MERGE (is2)-[:CONVERTED_BY]->(usdBonusRate)
  185. MERGE (buyerHome)-[:DESTINATION]->(is2)
  186. MERGE (is2)-[:OVERRIDES]->(is1)
  187. MERGE (is3)-[:OVERRIDES]->(is1)
  188. MERGE (order)-[:REASON]->(is2)
  189. MERGE (is2)-[:REASON]->(is3)
  190.  
  191. MERGE (cashInRequest:CashInRequest {name: "CashInRequest1"})
  192. MERGE (order)-[:REASON]->(cashInRequest)
  193.  
  194. MERGE (payment1:Payment {name: "Payment1", baseAmount: 13000, baseCurrency: "BONUS", amount: 6500, currency: "USD"})
  195. MERGE (payment1)-[:CONVERTED_BY]->(usdBonusRate)
  196. MERGE (cashInRequest)-[:REASON]->(payment1)
  197. MERGE (payment1)-[:FROM]->(buyerBank)
  198. MERGE (payment1)-[:TO]->(systemBank)
  199.  
  200. MERGE (emit1:BonusEmit {name: "BonusEmit1", amount: 13000})
  201. MERGE (payment1)-[:REASON]->(emit1)
  202. MERGE (emit1)-[:TO]->(systemTransfer)
  203.  
  204. MERGE (bt1:BonusTransfer {name: "Покупка бонусов", amount: 13000})
  205. MERGE (emit1)-[:REASON]->(bt1)
  206. MERGE (bt1)-[:FROM]->(systemTransfer)
  207. MERGE (bt1)-[:TO]->(buyerBonus)
  208.  
  209. MERGE (balancing1:AccountBalancing {name: "balancing1"})
  210. MERGE (bt1)-[:REASON]->(balancing1)
  211.  
  212. MERGE (bt2:BonusTransfer {name: "Оплата заказа", appliedFormula: "order.amount * 80%", amount: 8000})
  213. MERGE (balancing1)-[:REASON]->(bt2)
  214. MERGE (bt2)-[:FROM]->(buyerBonus)
  215. MERGE (bt2)-[:TO]->(sellerBonus)
  216.  
  217. MERGE (bt3:BonusTransfer {name: "Оплата доставки заказа", appliedFormula: "logisticSchema.amount", amount: 3000})
  218. MERGE (balancing1)-[:REASON]->(bt3)
  219. MERGE (bt3)-[:FROM]->(buyerBonus)
  220. MERGE (bt3)-[:TO]->(systemBonus)
  221.  
  222. MERGE (bt4:BonusTransfer {name: "Комиссия за сервис", appliedFormula: "order.amount * 10%", amount: 1000})
  223. MERGE (balancing1)-[:REASON]->(bt4)
  224. MERGE (bt4)-[:FROM]->(buyerBonus)
  225. MERGE (bt4)-[:TO]->(systemBonus)
  226.  
  227. MERGE (bt5:BonusTransfer {name: "Вознаграждение фотографам", appliedFormula: "order.amount * 5% / count(photographers)", amount: 500})
  228. MERGE (balancing1)-[:REASON]->(bt5)
  229. MERGE (bt5)-[:FROM]->(buyerBonus)
  230. MERGE (bt5)-[:TO]->(photographerBonus)
  231.  
  232. MERGE (bt6:BonusTransfer {name: "Cash Back", appliedFormula: "order.amount * 5%", amount: 500})
  233. MERGE (balancing1)-[:REASON]->(bt6)
  234. MERGE (bt6)-[:FROM]->(buyerBonus)
  235. MERGE (bt6)-[:TO]->(buyerBonus)
  236.  
  237. MERGE (is4:ItemStatus {name: "is4", amount: 50, price: 200, currency: "BONUS", status: "ToBePacked", quality: "Best"})
  238. MERGE (is4)-[:OVERRIDES]->(is2)
  239. MERGE (balancing1)-[:REASON]->(is4)
  240.  
  241. MERGE (cargo1:Cargo {name: "Cargo1"})
  242. MERGE (balancing1)-[:REASON]->(cargo1)
  243. MERGE (cargo1)-[:FROM]->(sellerWarehouse)
  244. MERGE (cargo1)-[:TO]->(systemLithuaniaWarehouse)
  245. MERGE (cargo1)-[:VIA]->(hkBarge)
  246.  
  247. MERGE (is5:ItemStatus {name: "is5", amount: 50, price: 200, currency: "BONUS", status: "Dispatched", quality: "Best"})
  248. MERGE (is5)-[:OVERRIDES]->(is4)
  249. MERGE (cargo1)-[:REASON]->(is5)
  250.  
  251. MERGE (deliveryReport1:DeliveryReport {name: "DeliveryReport1"})
  252. MERGE (cargo1)-[:REASON]->(deliveryReport1)
  253.  
  254. MERGE (is6:ItemStatus {name: "is6", amount: 50, price: 200, currency: "BONUS", status: "ToBePacked", quality: "Best"})
  255. MERGE (is6)-[:LOCATED]->(systemLithuaniaWarehouse)
  256. MERGE (is6)-[:OVERRIDES]->(is5)
  257. MERGE (deliveryReport1)-[:REASON]->(is6)
  258.  
  259. MERGE (cargo2:Cargo {name: "Cargo2"})
  260. MERGE (deliveryReport1)-[:REASON]->(cargo2)
  261. MERGE (cargo2)-[:FROM]->(systemLithuaniaWarehouse)
  262. MERGE (cargo2)-[:TO]->(systemMoscowWarehouse)
  263. MERGE (cargo2)-[:VIA]->(internalDelivery)
  264.  
  265. MERGE (is7:ItemStatus {name: "is7", amount: 50, price: 200, currency: "BONUS", status: "Dispatched", quality: "Best"})
  266. MERGE (is7)-[:OVERRIDES]->(is6)
  267. MERGE (cargo2)-[:REASON]->(is7)
  268.  
  269. MERGE (deliveryReport2:DeliveryReport {name: "DeliveryReport2"})
  270. MERGE (cargo2)-[:REASON]->(deliveryReport2)
  271.  
  272. MERGE (is8:ItemStatus {name: "is8", amount: 50, price: 200, currency: "BONUS", status: "ToBePacked", quality: "Best"})
  273. MERGE (is8)-[:LOCATED]->(systemMoscowWarehouse)
  274. MERGE (is8)-[:OVERRIDES]->(is7)
  275. MERGE (deliveryReport2)-[:REASON]->(is8)
  276.  
  277. MERGE (cargo3:Cargo {name: "Cargo3"})
  278. MERGE (deliveryReport2)-[:REASON]->(cargo3)
  279. MERGE (cargo3)-[:FROM]->(systemMoscowWarehouse)
  280. MERGE (cargo3)-[:TO]->(buyerHome)
  281. MERGE (cargo3)-[:VIA]->(ups)
  282.  
  283. MERGE (is9:ItemStatus {name: "is9", amount: 50, price: 200, currency: "BONUS", status: "Dispatched", quality: "Best"})
  284. MERGE (is9)-[:OVERRIDES]->(is8)
  285. MERGE (cargo3)-[:REASON]->(is9)
  286.  
  287. MERGE (deliveryReport3:DeliveryReport {name: "DeliveryReport3"})
  288. MERGE (cargo3)-[:REASON]->(deliveryReport3)
  289.  
  290. MERGE (is10:ItemStatus {name: "is10", amount: 50, price: 200, currency: "BONUS", status: "Delivered", quality: "Best"})
  291. MERGE (is10)-[:LOCATED]->(buyerHome)
  292. MERGE (is10)-[:OVERRIDES]->(is9)
  293. MERGE (deliveryReport3)-[:REASON]->(is10)
  294.  
  295. MERGE (offerEdit:DeliveryReport {name: "OfferEdit1"})
  296. MERGE (offer)-[:REASON]->(offerEdit)
  297.  
  298. MERGE (is11:ItemStatus {name: "is11", amount: 40, price: 110, currency: "USD", status: "Available", quality: "Best"})
  299. MERGE (is11)-[:OVERRIDES]->(is3)
  300. MERGE (offerEdit)-[:REASON]->(is11)
  301.  
  302. MERGE (cashOutRequest:CashOutRequest {name: "CashOutRequest1"})
  303.  
  304. MERGE (bt7:BonusTransfer {name: "Вывод бонусов", amount: 500})
  305. MERGE (cashOutRequest)-[:REASON]->(bt7)
  306. MERGE (bt7)-[:FROM]->(photographerBonus)
  307. MERGE (bt7)-[:TO]->(systemTransfer)
  308.  
  309. MERGE (payment2:Payment {name: "Payment2", baseAmount: 500, baseCurrency: "BONUS", amount: 250, currency: "USD"})
  310. MERGE (payment2)-[:CONVERTED_BY]->(usdBonusRate)
  311. MERGE (bt7)-[:REASON]->(payment2)
  312. MERGE (payment2)-[:FROM]->(systemBank)
  313. MERGE (payment2)-[:TO]->(photographerBank)
  314.  
  315. MERGE (emit2:BonusEmit {name: "BonusEmit2", amount: -500})
  316. MERGE (payment2)-[:REASON]->(emit2)
  317. MERGE (emit2)-[:TO]->(systemTransfer)
  318.  
  319. MERGE (esd1:EventSeriesDevision {name: "EventSeriesDevision1"})
  320. MERGE (team)-[:INCLUDED_IN]->(esd1)
  321.  
  322. MERGE (devision1:Devision {name: "devision1"})
  323. MERGE (devision1)-[:UNKNOWN]->(esd1)
  324.  
  325. MERGE (es1:EventSeries {name: "EventSeries1"})
  326. MERGE (esd1)-[:PARTICIPANT]->(es1)
  327.  
  328. MERGE (et1:EventTournament {name: "EventTournament1"})
  329. MERGE (es1)-[:INCLUDES]->(et1)
  330.  
  331. MERGE (et2:EventTournament {name: "EventTournament2"})
  332. MERGE (es1)-[:INCLUDES]->(et2)
  333.  
  334. MERGE (mission:Mission {name: "Battle for New-York"})
  335. MERGE (admin)-[:AUTHOR]->(mission)
  336.  
  337. MERGE (usa:MissionUnit {name: "USA"})
  338. MERGE (usa)-[:FRACTION]->(mission)
  339.  
  340. MERGE (ussr:MissionUnit {name: "USSR"})
  341. MERGE (ussr)-[:FRACTION]->(mission)
  342.  
  343. MERGE (em1:EventMission {name: "Game: Battle for New-York"})
  344. MERGE (mission)-[:SCENARIO]->(em1)
  345. MERGE (moscowPark)-[:SPOT]->(em1)
  346.  
  347. MERGE (emu1:EventMissionUnit {name: "USA in Battle for New-York"})
  348. MERGE (usa)-[:PROTOTYPE]->(emu1)
  349. MERGE (emu1)-[:PARTICIPANT]->(em1)
  350.  
  351. MERGE (emu2:EventMissionUnit {name: "USSR in Battle for New-York"})
  352. MERGE (ussr)-[:PROTOTYPE]->(emu2)
  353. MERGE (emu2)-[:PARTICIPANT]->(em1)
  354.  
  355. MERGE (esc1:EventScenario {name: "USSR vs USA 21century"})
  356. MERGE (esc1)-[:INCLUDES]->(em1)
  357.  
  358. MERGE (camp1:Campaign {name: "CAMPAIGN????"})
  359. MERGE (camp1)-[:INCLUDES]->(esc1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement