Advertisement
ynifor

Untitled

Nov 23rd, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.26 KB | None | 0 0
  1. -- Insert wine
  2. INSERT INTO wines (id, winery, name, year, image_name, origin)
  3. VALUES (2, 'Château Margaux', 'Grand Vin', 2016, 'margaux_2015.jpg',
  4. ARRAY['France', 'Bordeaux', 'Margaux']);
  5.  
  6. -- Insert wine details
  7. INSERT INTO wine_details (wine_id, description, color, size, classification, blend, sweetness, alcohol)
  8. VALUES (2,
  9. 'A remarkable vintage showcasing the epitome of Margaux''s terroir with exceptional balance and complexity.',
  10. 'red',
  11. '0.75',
  12. 'Premier Cru',
  13. ARRAY['Cabernet Sauvignon', 'Merlot', 'Petit Verdot', 'Cabernet Franc'],
  14. 'dry',
  15. 13.5);
  16.  
  17. -- Insert wine analytics
  18. INSERT INTO wine_analytics (wine_id, critic_score, avarage_retail_price)
  19. VALUES (2, 98, 860.00);
  20.  
  21. -- Insert tokens for the wine
  22. INSERT INTO tokens (id, collection_id, wine_id, creator, owner, minted_at, minted_tx, burned)
  23. VALUES
  24. (4, 1, 2,
  25. '0x2234567890123456789012345678901234567890',
  26. '0x4234567890123456789012345678901234567890',
  27. 1699891200,
  28. '0xabcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234',
  29. false),
  30. (5, 1, 2,
  31. '0x2234567890123456789012345678901234567890',
  32. '0x5234567890123456789012345678901234567890',
  33. 1699891200,
  34. '0xefef5678efef5678efef5678efef5678efef5678efef5678efef5678efef5678',
  35. false),
  36. (6, 1, 2,
  37. '0x2234567890123456789012345678901234567890',
  38. '0x5234567890123456789012345678901234567890',
  39. 1699891200,
  40. '0xefef5678efef5678efef5678efef5678efef5678efef5678efef5678efef5678',
  41. true); -- Burned
  42.  
  43. -- Insert token metadata
  44. INSERT INTO token_metadata (token_id, collection_id, meta_uri)
  45. VALUES
  46. (4, 1, 'ipfs://QmAbC123...1'),
  47. (5, 1, 'ipfs://QmAbC123...2'),
  48. (6, 1, 'ipfs://QmAbC123...2');
  49.  
  50. -- Insert orders for first token
  51. INSERT INTO orders (id, seller, buyer, collection_id, token_id, price, payment_token, duration, expire_at)
  52. VALUES
  53. (8,
  54. '0x4234567890123456789012345678901234567890',
  55. '0x6234567890123456789012345678901234567890',
  56. 1, 4, 900.00,
  57. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  58. 604800,
  59. 1700496000),
  60. (9,
  61. '0x4234567890123456789012345678901234567890',
  62. NULL,
  63. 1, 4, 950.00,
  64. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  65. 604800,
  66. 1701100800), -- November 27, 2024
  67. (10,
  68. '0x4234567890123456789012345678901234567890',
  69. NULL,
  70. 1, 4, 1000.00,
  71. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  72. 604800,
  73. 1701705600); -- December 4, 2024
  74.  
  75. INSERT INTO order_statuses (order_id, state, timestamp)
  76. VALUES
  77. (8, 1, 1699891200), -- Created
  78. (8, 3, 1699977600), -- Confirmed
  79. (8, 7, 1699891200), -- Fulfilled
  80.  
  81. (9, 1, 1699977600), -- Created
  82. (9, 3, 1700064000), -- Confirmed
  83.  
  84. (10, 1, 1700150400); -- Created
  85.  
  86. -- Insert orders for second token
  87. INSERT INTO orders (id, seller, buyer, collection_id, token_id, price, payment_token, duration, expire_at)
  88. VALUES
  89. (11,
  90. '0x5234567890123456789012345678901234567890',
  91. '0x7234567890123456789012345678901234567890',
  92. 1, 5, 880.00,
  93. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  94. 604800,
  95. 1700496000),
  96. (12,
  97. '0x5234567890123456789012345678901234567890',
  98. NULL,
  99. 1, 5, 920.00,
  100. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  101. 604800,
  102. 1701100800),
  103. (13,
  104. '0x5234567890123456789012345678901234567890',
  105. NULL,
  106. 1, 5, 975.00,
  107. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  108. 604800,
  109. 1701705600);
  110.  
  111. INSERT INTO order_statuses (order_id, state, timestamp)
  112. VALUES
  113. (11, 1, 1699891200), -- Created
  114. (11, 3, 1699977600), -- Confirmed
  115. (11, 7, 1699891200), -- Fulfilled
  116.  
  117. (12, 1, 1699977600), -- Created
  118. (12, 3, 1700064000), -- Confirmed
  119.  
  120. (13, 1, 1700150400); -- Created
  121.  
  122. -- Insert orders for third(burned) token
  123. INSERT INTO orders (id, seller, buyer, collection_id, token_id, price, payment_token, duration, expire_at)
  124. VALUES
  125. (14,
  126. '0x5234567890123456789012345678901234567890',
  127. NULL,
  128. 1, 6, 69.00,
  129. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  130. 604800,
  131. 1701705600);
  132.  
  133. INSERT INTO order_statuses (order_id, state, timestamp)
  134. VALUES
  135. (14, 1, 1699977600), -- Created
  136. (14, 3, 1700064000); -- Confirmed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement