INSERT INTO categories (id, parent_id, name, slug, is_active)
VALUES
  ('11111111-1111-1111-1111-111111111111', NULL, 'Сухие смеси', 'dry-mixes', TRUE),
  ('22222222-2222-2222-2222-222222222222', '11111111-1111-1111-1111-111111111111', 'Цемент', 'cement', TRUE),
  ('33333333-3333-3333-3333-333333333333', '11111111-1111-1111-1111-111111111111', 'Шпаклевки', 'putty', TRUE)
ON CONFLICT (id) DO NOTHING;

INSERT INTO brands (id, name, slug)
VALUES
  ('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'Holcim', 'holcim'),
  ('bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', 'Knauf', 'knauf')
ON CONFLICT (id) DO NOTHING;

INSERT INTO products (
  id, sku, name, description, category_id, brand_id, unit, is_active
)
VALUES (
  '99999999-9999-9999-9999-999999999999',
  'CEM-500-50',
  'Цемент М500, 50 кг',
  'Для кладочных и бетонных работ',
  '22222222-2222-2222-2222-222222222222',
  'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa',
  'bag',
  TRUE
)
ON CONFLICT (id) DO NOTHING;

INSERT INTO prices (product_id, currency, price, old_price)
VALUES ('99999999-9999-9999-9999-999999999999', 'RUB', 489.90, 529.90)
ON CONFLICT (product_id) DO NOTHING;

INSERT INTO stocks (product_id, qty, reserved_qty)
VALUES ('99999999-9999-9999-9999-999999999999', 120.000, 5.000)
ON CONFLICT (product_id) DO NOTHING;

INSERT INTO product_attributes (id, product_id, key, value, unit)
VALUES
  ('aaaa1111-1111-1111-1111-111111111111', '99999999-9999-9999-9999-999999999999', 'weight', '50', 'kg'),
  ('aaaa2222-2222-2222-2222-222222222222', '99999999-9999-9999-9999-999999999999', 'strength', 'M500', NULL),
  ('aaaa3333-3333-3333-3333-333333333333', '99999999-9999-9999-9999-999999999999', 'color', 'gray', NULL)
ON CONFLICT (id) DO NOTHING;

INSERT INTO product_images (id, product_id, url, sort_order)
VALUES
  ('bbbb1111-1111-1111-1111-111111111111', '99999999-9999-9999-9999-999999999999', 'https://images.unsplash.com/photo-1519751138087-5bf79df62d5b', 1),
  ('bbbb2222-2222-2222-2222-222222222222', '99999999-9999-9999-9999-999999999999', 'https://images.unsplash.com/photo-1581093458791-9d15482442f2', 2)
ON CONFLICT (id) DO NOTHING;
