Created
May 6, 2019 16:39
-
-
Save vladbatushkov/ef0179a2e226a92125b1b29cd2455ee4 to your computer and use it in GitHub Desktop.
Made a booking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (tr1:Trip { code: "3_7" }) | |
MATCH (tr2:Trip { code: "2_12" }) | |
MERGE (p1:Passenger { name: "Vlad Batushkov", passport: "XXX" }) | |
MERGE (p2:Passenger { name: "Katerina Batushkova", passport: "XXX" }) | |
MERGE (t1:Ticket { sitNo: 7, wagon: 3 }) | |
MERGE (t2:Ticket { sitNo: 8, wagon: 3 }) | |
MERGE (t3:Ticket { sitNo: 1, wagon: 1 }) | |
MERGE (t4:Ticket { sitNo: 2, wagon: 1 }) | |
MERGE (b:Booking { createdAt: localdatetime() }) | |
MERGE (p:Payment { createdAt: localdatetime(), status: "Paid", amount: 400, transactionCode: "XXX" }) | |
MERGE (u:User { login: "vladbatushkov" }) | |
MERGE (u)-[:HAS]->(b) | |
MERGE (b)-[:PAID_METHOD]->(p) | |
MERGE (t1)-[:FOR]->(p1) | |
MERGE (t2)-[:FOR]->(p2) | |
MERGE (t3)-[:FOR]->(p1) | |
MERGE (t4)-[:FOR]->(p2) | |
MERGE (tr1)-[:RELEASE]->(t1)<-[:INCLUDES]-(b)-[:INCLUDES]->(t2)<-[:RELEASE]-(tr1) | |
MERGE (tr2)-[:RELEASE]->(t3)<-[:INCLUDES]-(b)-[:INCLUDES]->(t4)<-[:RELEASE]-(tr2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment