-- Generated from cents-pro/backup/excel/*.xlsx
-- Users: QHB, WHR; password for newly created users: 12345678
-- Re-runnable: existing users, ledgers, entries and links are preserved.
BEGIN;

CREATE TEMP TABLE _import_users (name text PRIMARY KEY, id text NOT NULL);
CREATE TEMP TABLE _import_ledgers (source_name text PRIMARY KEY, id text NOT NULL);
CREATE TEMP TABLE _import_personal (user_id text PRIMARY KEY, ledger_id text NOT NULL);
INSERT INTO users (id, name, name_key, password_hash) VALUES ('28a9e750-317b-5756-ab33-fc89cbaa96d6', 'QHB', lower('QHB'), '$argon2id$v=19$m=19456,t=2,p=1$EvRpA258y2AhKQtmTQqQJQ$4f6Vr1Ya+JmfEvO6iCl56p1IEvMVDVszAZTGh2H/Cbg') ON CONFLICT (name_key) DO NOTHING;
INSERT INTO users (id, name, name_key, password_hash) VALUES ('3cd5356d-e779-565f-9f80-c0861bb60498', 'WHR', lower('WHR'), '$argon2id$v=19$m=19456,t=2,p=1$EvRpA258y2AhKQtmTQqQJQ$4f6Vr1Ya+JmfEvO6iCl56p1IEvMVDVszAZTGh2H/Cbg') ON CONFLICT (name_key) DO NOTHING;
INSERT INTO _import_users SELECT name, id FROM users WHERE name_key IN ('qhb','whr');

INSERT INTO ledgers (id, name, color, theme, default_currency, personal_owner_id) SELECT 'ffab108e-4121-598e-ac3d-2baf9ce9172a', '个人账本', '#087f72', 'jade', 'CNY', id FROM _import_users WHERE name = 'QHB' ON CONFLICT (id) DO NOTHING;
INSERT INTO ledgers (id, name, color, theme, default_currency, personal_owner_id) SELECT '120f8bf9-2218-5e74-b33b-5f990459db56', '个人账本', '#087f72', 'jade', 'CNY', id FROM _import_users WHERE name = 'WHR' ON CONFLICT (id) DO NOTHING;
INSERT INTO _import_personal SELECT iu.id, l.id FROM _import_users iu JOIN ledgers l ON l.personal_owner_id = iu.id ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT ledger_id, user_id, 'owner' FROM _import_personal ON CONFLICT DO NOTHING;

INSERT INTO ledgers (id, name, color, theme, default_currency) VALUES ('1f928dfc-5c06-52d0-ba66-62824a92bbe3', '2024国庆-云南之旅', '#3478e5', 'ocean', 'CNY') ON CONFLICT (id) DO NOTHING;
INSERT INTO _import_ledgers (source_name, id) VALUES ('2024国庆-云南之旅', '1f928dfc-5c06-52d0-ba66-62824a92bbe3') ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT '1f928dfc-5c06-52d0-ba66-62824a92bbe3', id, 'owner' FROM _import_users WHERE name = 'QHB' ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT '1f928dfc-5c06-52d0-ba66-62824a92bbe3', id, 'member' FROM _import_users WHERE name = 'WHR' ON CONFLICT DO NOTHING;
INSERT INTO ledgers (id, name, color, theme, default_currency) VALUES ('ec8e115b-937a-52dd-a659-c6f130787e69', '欧洲之旅2024', '#3478e5', 'ocean', 'CNY') ON CONFLICT (id) DO NOTHING;
INSERT INTO _import_ledgers (source_name, id) VALUES ('欧洲之旅2024', 'ec8e115b-937a-52dd-a659-c6f130787e69') ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT 'ec8e115b-937a-52dd-a659-c6f130787e69', id, 'owner' FROM _import_users WHERE name = 'QHB' ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT 'ec8e115b-937a-52dd-a659-c6f130787e69', id, 'member' FROM _import_users WHERE name = 'WHR' ON CONFLICT DO NOTHING;
INSERT INTO ledgers (id, name, color, theme, default_currency) VALUES ('3e47ecea-d6e9-5eeb-af35-755dbe64af85', '泰国之旅2025', '#3478e5', 'ocean', 'CNY') ON CONFLICT (id) DO NOTHING;
INSERT INTO _import_ledgers (source_name, id) VALUES ('泰国之旅2025', '3e47ecea-d6e9-5eeb-af35-755dbe64af85') ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT '3e47ecea-d6e9-5eeb-af35-755dbe64af85', id, 'owner' FROM _import_users WHERE name = 'QHB' ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT '3e47ecea-d6e9-5eeb-af35-755dbe64af85', id, 'member' FROM _import_users WHERE name = 'WHR' ON CONFLICT DO NOTHING;
INSERT INTO ledgers (id, name, color, theme, default_currency) VALUES ('dcf78c4b-b938-528d-804b-1f8e28e735f6', '爱法花园装修', '#3478e5', 'ocean', 'CNY') ON CONFLICT (id) DO NOTHING;
INSERT INTO _import_ledgers (source_name, id) VALUES ('爱法花园装修', 'dcf78c4b-b938-528d-804b-1f8e28e735f6') ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT 'dcf78c4b-b938-528d-804b-1f8e28e735f6', id, 'owner' FROM _import_users WHERE name = 'QHB' ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT 'dcf78c4b-b938-528d-804b-1f8e28e735f6', id, 'member' FROM _import_users WHERE name = 'WHR' ON CONFLICT DO NOTHING;
INSERT INTO ledgers (id, name, color, theme, default_currency) VALUES ('1d662bb1-4162-5b91-80c5-952b672e87ab', '育儿支出', '#3478e5', 'ocean', 'CNY') ON CONFLICT (id) DO NOTHING;
INSERT INTO _import_ledgers (source_name, id) VALUES ('育儿支出', '1d662bb1-4162-5b91-80c5-952b672e87ab') ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT '1d662bb1-4162-5b91-80c5-952b672e87ab', id, 'owner' FROM _import_users WHERE name = 'QHB' ON CONFLICT DO NOTHING;
INSERT INTO ledger_members (ledger_id, user_id, role) SELECT '1d662bb1-4162-5b91-80c5-952b672e87ab', id, 'member' FROM _import_users WHERE name = 'WHR' ON CONFLICT DO NOTHING;

CREATE TEMP TABLE _import_entries (id text PRIMARY KEY, source_name text NOT NULL, owner_name text NOT NULL, entry_type text NOT NULL, amount integer NOT NULL, currency text NOT NULL, category_id text NOT NULL, note text NOT NULL, occurred_at timestamptz NOT NULL, exchange_rate_date date NOT NULL, base_amount integer, exchange_rate text, exchange_rate_effective_date date, conversion_status text NOT NULL);
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('d86c25c5-1558-555b-bd4c-f821c40de1c5','2024国庆-云南之旅','QHB','expense',2400,'CNY','food','霸王茶姬','2024-10-05T00:00:00+08','2024-10-05',2400,'1','2024-10-05','exact'),
('1133d6ac-bbab-5e0f-bc6e-6b11289a2cca','2024国庆-云南之旅','WHR','expense',6700,'CNY','gift','鲜花饼','2024-10-05T00:00:00+08','2024-10-05',6700,'1','2024-10-05','exact'),
('d41e81b1-719d-5400-b66e-581de354ac2f','2024国庆-云南之旅','QHB','expense',17800,'CNY','food','旮旯','2024-10-05T00:00:00+08','2024-10-05',17800,'1','2024-10-05','exact'),
('441e60b5-bb3c-53e5-9585-69edd9132dfe','2024国庆-云南之旅','QHB','expense',10000,'CNY','food','逛吃','2024-10-04T00:00:00+08','2024-10-04',10000,'1','2024-10-04','exact'),
('d8110e29-3bd9-579c-827b-3e0eb6268752','2024国庆-云南之旅','QHB','expense',32600,'CNY','drinks','礼物','2024-10-04T00:00:00+08','2024-10-04',32600,'1','2024-10-04','exact'),
('0af3488b-6ce9-5573-9e30-c1abf6a6711c','2024国庆-云南之旅','WHR','expense',12000,'CNY','tickets','滇池上山索道','2024-10-04T00:00:00+08','2024-10-04',12000,'1','2024-10-04','exact'),
('205c50ce-661d-5caa-a808-f6e152b7bcf8','2024国庆-云南之旅','QHB','expense',2200,'CNY','transport','','2024-10-04T00:00:00+08','2024-10-04',2200,'1','2024-10-04','exact'),
('f097b79e-55d5-518d-bcca-ad966a8040c3','2024国庆-云南之旅','QHB','expense',4000,'CNY','food','正新鸡排','2024-10-03T00:00:00+08','2024-10-03',4000,'1','2024-10-03','exact'),
('3eb1138a-0ba7-5e88-963f-83b35ce150de','2024国庆-云南之旅','QHB','expense',6900,'CNY','food','KFC','2024-10-03T00:00:00+08','2024-10-03',6900,'1','2024-10-03','exact'),
('c124c627-0d9a-5a8a-a394-ed27b722f9c5','2024国庆-云南之旅','QHB','expense',15000,'CNY','food','热火朝天','2024-10-02T00:00:00+08','2024-10-02',15000,'1','2024-10-02','exact'),
('7dbf40f3-d807-5cbd-bce8-f73d6cf86941','2024国庆-云南之旅','QHB','expense',2700,'CNY','food','奶茶','2024-10-02T00:00:00+08','2024-10-02',2700,'1','2024-10-02','exact'),
('82efef3a-d6f9-544a-968e-1165f5a3ec7a','2024国庆-云南之旅','WHR','expense',18200,'CNY','food','五湖蒸汽石锅鱼','2024-10-02T00:00:00+08','2024-10-02',18200,'1','2024-10-02','exact'),
('f6395a67-de9f-50c7-a3ea-f0cf88be5141','2024国庆-云南之旅','WHR','expense',18000,'CNY','tickets','云南植物园+扶荔宫讲解','2024-10-01T00:00:00+08','2024-10-01',18000,'1','2024-10-01','exact'),
('da7e2872-1d7c-5c5d-a0ec-6c7b4ba1ee33','2024国庆-云南之旅','WHR','expense',20000,'CNY','food','傣宫主','2024-10-01T00:00:00+08','2024-10-01',20000,'1','2024-10-01','exact'),
('722f51be-7bab-5746-ae30-77edad8bbeb4','2024国庆-云南之旅','WHR','expense',1900,'CNY','transport','打车 古城-丽江千古情景区','2024-10-01T00:00:00+08','2024-10-01',1900,'1','2024-10-01','exact'),
('4a83cd0f-7d7d-5e0f-bdfc-adcee46758c3','2024国庆-云南之旅','WHR','expense',10300,'CNY','food','云梦楼','2024-10-01T00:00:00+08','2024-10-01',10300,'1','2024-10-01','exact'),
('c79229cc-14d6-5ad1-91db-0b01b623dd7b','2024国庆-云南之旅','WHR','expense',46000,'CNY','tickets','丽江千古情','2024-10-01T00:00:00+08','2024-10-01',46000,'1','2024-10-01','exact'),
('5b733a46-da39-5949-8ab1-72da180b2acf','2024国庆-云南之旅','WHR','expense',14500,'CNY','food','滇厨','2024-09-30T00:00:00+08','2024-09-30',14500,'1','2024-09-30','exact'),
('21df92ee-6e63-5c18-aa23-58f03bbe83cf','2024国庆-云南之旅','QHB','expense',9000,'CNY','food','烧烤','2024-09-30T00:00:00+08','2024-09-30',9000,'1','2024-09-30','exact'),
('7a080c05-c4ed-5e65-9dea-358d4915c90d','2024国庆-云南之旅','WHR','expense',10200,'CNY','food','榴莲','2024-09-30T00:00:00+08','2024-09-30',10200,'1','2024-09-30','exact'),
('1b2fa5dd-16c7-5bc0-8721-af47614e28ae','2024国庆-云南之旅','QHB','expense',13000,'CNY','transport','行李升级','2024-09-29T00:00:00+08','2024-09-29',13000,'1','2024-09-29','exact'),
('c5f0c524-630e-5651-95a8-757a964f0f8f','2024国庆-云南之旅','QHB','expense',22000,'CNY','food','滇西王子','2024-09-29T00:00:00+08','2024-09-29',22000,'1','2024-09-29','exact'),
('93a91a5e-c008-50ca-9a2e-200811445089','2024国庆-云南之旅','WHR','expense',5000,'CNY','transport','丽江机场-酒店打车','2024-09-29T00:00:00+08','2024-09-29',5000,'1','2024-09-29','exact'),
('b9487f4a-70a8-5cc6-a669-a6afa2fa9eb4','2024国庆-云南之旅','WHR','expense',9000,'CNY','transport','家-浦东机场','2024-09-29T00:00:00+08','2024-09-29',9000,'1','2024-09-29','exact'),
('e6f868a0-6469-508f-b9fb-34f39c7ea30e','2024国庆-云南之旅','WHR','expense',18000,'CNY','hotel','乾沁花园公寓(昆明长水国际机场店)','2024-09-15T00:00:00+08','2024-09-15',18000,'1','2024-09-15','exact');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('d7327f71-856f-5eee-be75-31e8a053ab1f','2024国庆-云南之旅','WHR','expense',96900,'CNY','hotel','昆明麗枫酒店10.2-10.5','2024-09-15T00:00:00+08','2024-09-15',96900,'1','2024-09-15','exact'),
('8ba1542e-d34c-56ee-9158-71858f0ad1b8','2024国庆-云南之旅','QHB','expense',298800,'CNY','transport','昆明到上海','2024-09-15T00:00:00+08','2024-09-15',298800,'1','2024-09-15','exact'),
('1c631540-2f34-5e69-98ba-0155af7ab913','2024国庆-云南之旅','WHR','expense',83100,'CNY','hotel','丽江如家9.29-10.2','2024-09-15T00:00:00+08','2024-09-15',83100,'1','2024-09-15','exact'),
('73115654-7cc7-5b01-b76c-8143302c791f','2024国庆-云南之旅','QHB','expense',259400,'CNY','transport','上海到丽江','2024-09-15T00:00:00+08','2024-09-15',259400,'1','2024-09-15','exact'),
('e3e3e04a-1f4f-5f97-8455-d340bacf03ac','欧洲之旅2024','WHR','expense',3480,'EUR','shopping','机场买零食','2024-06-29T00:00:00+08','2024-06-29',NULL,NULL,NULL,'pending'),
('7e765c19-72c9-56d7-aec8-3d7cf800f2cd','欧洲之旅2024','WHR','expense',3120,'EUR','food','VIPS','2024-06-29T00:00:00+08','2024-06-29',NULL,NULL,NULL,'pending'),
('f3051da4-34a9-5e04-9531-224fda4707c9','欧洲之旅2024','WHR','expense',3450,'EUR','food','湘遇','2024-06-29T00:00:00+08','2024-06-29',NULL,NULL,NULL,'pending'),
('26f5606e-70d4-5373-b4fa-189ed2e0356f','欧洲之旅2024','WHR','expense',7800,'EUR','food','La Charca Taberna 虾肉棒棒糖 豆子汤 牛尾 蘑菇烩饭','2024-06-28T00:00:00+08','2024-06-28',NULL,NULL,NULL,'pending'),
('8b2ae16c-4634-562b-8633-99bb73b51dd0','欧洲之旅2024','WHR','expense',860,'EUR','transport','马德里地铁票','2024-06-28T00:00:00+08','2024-06-28',NULL,NULL,NULL,'pending'),
('85c057a1-bd90-5935-a3ec-6389c43cdb90','欧洲之旅2024','WHR','expense',4490,'EUR','food','Estraperlo Barceloneta tapas：炸鱿鱼 炒蔬菜 牛肉 布拉塔奶酪','2024-06-27T00:00:00+08','2024-06-27',NULL,NULL,NULL,'pending'),
('da1e80f4-482b-5980-aff8-32117ee6bf3d','欧洲之旅2024','WHR','expense',1861,'EUR','shopping','家乐福购物','2024-06-27T00:00:00+08','2024-06-27',NULL,NULL,NULL,'pending'),
('b37f586e-b29e-5949-823f-7701e71c898a','欧洲之旅2024','WHR','expense',500,'EUR','food','冰淇淋','2024-06-27T00:00:00+08','2024-06-27',NULL,NULL,NULL,'pending'),
('fac9b38d-8815-5fe0-8346-c0c06a2a0dea','欧洲之旅2024','WHR','expense',3800,'EUR','shopping','香薰蜡烛*2','2024-06-27T00:00:00+08','2024-06-27',NULL,NULL,NULL,'pending'),
('e18dc2a4-4529-55f0-b86a-8cef0cb6989e','欧洲之旅2024','WHR','expense',986,'EUR','food','Jon Cake 巴斯克蛋糕','2024-06-27T00:00:00+08','2024-06-27',NULL,NULL,NULL,'pending'),
('5dc5fb49-caeb-51f6-81d4-644aef827002','欧洲之旅2024','WHR','expense',4500,'EUR','food','Anduriña 蒜蓉虾 牛肉 pulled pork 鳕鱼','2024-06-27T00:00:00+08','2024-06-27',NULL,NULL,NULL,'pending'),
('a80d5949-1efe-5828-9b43-38da10db54b6','欧洲之旅2024','WHR','expense',6300,'EUR','food','Antic Steak House 大龙虾海鲜饭 猪排 烤蘑菇','2024-06-26T00:00:00+08','2024-06-26',NULL,NULL,NULL,'pending'),
('ff11b8e0-c033-5e62-9ee1-b844a28bfe5c','欧洲之旅2024','WHR','expense',990,'EUR','shopping','圣家堂冰箱贴','2024-06-26T00:00:00+08','2024-06-26',NULL,NULL,NULL,'pending'),
('a65869f1-eb20-500c-922e-474dd26144aa','欧洲之旅2024','WHR','expense',3660,'EUR','food','Restaurant Cátedra','2024-06-26T00:00:00+08','2024-06-26',NULL,NULL,NULL,'pending'),
('02f77417-6d56-5664-860e-4485f5363ad0','欧洲之旅2024','WHR','expense',1110,'EUR','transport','打车去圣家堂','2024-06-26T00:00:00+08','2024-06-26',NULL,NULL,NULL,'pending'),
('4eb2ef97-96ff-57df-8fd7-4b73696066ad','欧洲之旅2024','WHR','expense',785,'EUR','shopping','奥乐齐买水零食','2024-06-25T00:00:00+08','2024-06-25',NULL,NULL,NULL,'pending'),
('d900265b-ff3c-5c30-95a3-bda63c0b1785','欧洲之旅2024','WHR','expense',4500,'EUR','food','el SET 餐厅 蒜蓉蘑菇和烤章鱼🐙','2024-06-25T00:00:00+08','2024-06-25',NULL,NULL,NULL,'pending'),
('99db124b-082c-5262-806c-acf966d1a965','欧洲之旅2024','WHR','expense',2530,'EUR','transport','巴塞罗那地铁卡*2','2024-06-25T00:00:00+08','2024-06-25',NULL,NULL,NULL,'pending'),
('172d4801-0664-5dda-b784-4271291ad7f7','欧洲之旅2024','WHR','expense',4398,'EUR','shopping','巴黎奥运杯子*2','2024-06-25T00:00:00+08','2024-06-25',NULL,NULL,NULL,'pending'),
('ca15ba05-5ab2-5df6-9bf5-1664ebd05d0d','欧洲之旅2024','WHR','expense',2360,'EUR','transport','去戴高乐机场车票*2','2024-06-25T00:00:00+08','2024-06-25',NULL,NULL,NULL,'pending'),
('7de67b6c-8e4f-568e-81a1-e25f4e6c9244','欧洲之旅2024','WHR','expense',430,'EUR','transport','地铁*2','2024-06-24T00:00:00+08','2024-06-24',NULL,NULL,NULL,'pending');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('0eac6d6d-1032-5af1-aa15-7d2cb71ca3fc','欧洲之旅2024','WHR','expense',1200,'EUR','entertainment','卢浮宫讲解器*2','2024-06-24T00:00:00+08','2024-06-24',NULL,NULL,NULL,'pending'),
('c35019da-0291-5538-89d9-71a1eae840c7','欧洲之旅2024','WHR','expense',3700,'EUR','food','Café de la Régence鸭腿和牛排','2024-06-24T00:00:00+08','2024-06-24',NULL,NULL,NULL,'pending'),
('1c7aaaab-3278-50ed-be85-0c1d67059984','欧洲之旅2024','WHR','expense',430,'EUR','transport','地铁*2','2024-06-24T00:00:00+08','2024-06-24',NULL,NULL,NULL,'pending'),
('c7fb8b97-6722-5a50-8f7c-3bdacfaa0034','欧洲之旅2024','WHR','expense',443,'EUR','shopping','家乐福买水','2024-06-23T00:00:00+08','2024-06-23',NULL,NULL,NULL,'pending'),
('be1d74c3-56f3-5473-8ef4-321a852dde75','欧洲之旅2024','WHR','expense',6300,'EUR','food','Bistro des Lettres 牛肋排 蔬菜烤千层面 蜗牛 菠萝甜品 😋','2024-06-23T00:00:00+08','2024-06-23',NULL,NULL,NULL,'pending'),
('21e43fed-a7f8-56c2-af5e-4ebc846fd48c','欧洲之旅2024','WHR','expense',1660,'EUR','transport','凡尔赛宫往返地铁火车*2','2024-06-23T00:00:00+08','2024-06-23',NULL,NULL,NULL,'pending'),
('9a294308-4984-5278-976b-dfeefbe5f29d','欧洲之旅2024','WHR','expense',2850,'EUR','food','Saveurs d''Asie 越南粉 拌粉好吃','2024-06-22T00:00:00+08','2024-06-22',NULL,NULL,NULL,'pending'),
('f1f027cf-a7ae-544a-9c53-7c7137d91b19','欧洲之旅2024','WHR','expense',4700,'EUR','food','Angelo Restaurant','2024-06-22T00:00:00+08','2024-06-22',NULL,NULL,NULL,'pending'),
('ceb3b16c-2ced-53a1-95b3-36660de6e4cc','欧洲之旅2024','WHR','expense',3120,'EUR','hotel','酒店额外付费','2024-06-22T00:00:00+08','2024-06-22',NULL,NULL,NULL,'pending'),
('b742e370-4867-5afc-960c-3a798f26b152','欧洲之旅2024','WHR','expense',3600,'EUR','entertainment','塞纳河游船*2','2024-06-22T00:00:00+08','2024-06-22',NULL,NULL,NULL,'pending'),
('e89ee985-adff-5e54-889c-c80f04eec6d2','欧洲之旅2024','WHR','expense',860,'EUR','transport','地铁票*4','2024-06-22T00:00:00+08','2024-06-22',NULL,NULL,NULL,'pending'),
('7b476e22-34d5-54c5-9b67-7d93647c3ae1','欧洲之旅2024','WHR','expense',3360,'EUR','food','Breakfast in America - Latin Quarter','2024-06-22T00:00:00+08','2024-06-22',NULL,NULL,NULL,'pending'),
('855095ab-15fa-5d18-97db-dbdcc72eb905','欧洲之旅2024','WHR','expense',1600,'EUR','food','汉堡王','2024-06-21T00:00:00+08','2024-06-21',NULL,NULL,NULL,'pending'),
('e33a9292-ee96-5023-8f3a-e5ca6df245c5','欧洲之旅2024','WHR','expense',4300,'EUR','food','Lu Fran Calin 酿蔬菜好吃','2024-06-21T00:00:00+08','2024-06-21',NULL,NULL,NULL,'pending'),
('259c73fa-30e7-500f-ad46-fb0d0481759c','欧洲之旅2024','WHR','expense',5260,'EUR','food','Lu Fran Calin 烤鱿鱼和奶油方饺子','2024-06-20T00:00:00+08','2024-06-20',NULL,NULL,NULL,'pending'),
('9512c268-8e08-5444-82c4-a51c368b11b7','欧洲之旅2024','WHR','expense',5500,'EUR','food','SAWASDEE 泰国菜','2024-06-20T00:00:00+08','2024-06-20',NULL,NULL,NULL,'pending'),
('963766a2-af38-53e8-a7f1-b410b951516d','欧洲之旅2024','WHR','expense',661,'EUR','shopping','家乐福','2024-06-19T00:00:00+08','2024-06-19',NULL,NULL,NULL,'pending'),
('fdee97aa-2c36-582e-aae3-68c700db0426','欧洲之旅2024','WHR','expense',5600,'EUR','food','Restaurant Le Lunel好喝的鱼汤 奶酪鸡蛋 牛排','2024-06-19T00:00:00+08','2024-06-19',NULL,NULL,NULL,'pending'),
('3e194018-8e94-5ec1-81e8-225a8626cfe7','欧洲之旅2024','WHR','expense',804,'EUR','hotel','尼斯酒店额外付款','2024-06-19T00:00:00+08','2024-06-19',NULL,NULL,NULL,'pending'),
('de7e394b-033e-531b-8617-c83e7c9912ae','欧洲之旅2024','WHR','expense',740,'EUR','transport','尼斯交通卡*2','2024-06-19T00:00:00+08','2024-06-19',NULL,NULL,NULL,'pending'),
('6379e054-28e9-5979-b530-e09483202eca','欧洲之旅2024','QHB','expense',2200,'EUR','food','机场 KFC','2024-06-19T00:00:00+08','2024-06-19',NULL,NULL,NULL,'pending'),
('ef16b439-48b1-5036-abbe-d9d5cde9f7d5','欧洲之旅2024','QHB','expense',1600,'EUR','transport','去菲乌米奇诺机场','2024-06-19T00:00:00+08','2024-06-19',NULL,NULL,NULL,'pending'),
('79bafa3d-a9af-5c41-ae45-44c234a8cb81','欧洲之旅2024','QHB','expense',150,'EUR','food','水','2024-06-18T00:00:00+08','2024-06-18',NULL,NULL,NULL,'pending'),
('230aba4b-70a5-50ad-9108-eeb04b5c4aeb','欧洲之旅2024','WHR','expense',230,'EUR','drinks','麦当劳梨子汁','2024-06-18T00:00:00+08','2024-06-18',NULL,NULL,NULL,'pending'),
('288b1b0e-6dbd-595e-a3e1-18c9012d5155','欧洲之旅2024','WHR','expense',6200,'EUR','food','Iari The Vino Ristorante 非常好吃','2024-06-18T00:00:00+08','2024-06-18',NULL,NULL,NULL,'pending');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('0e0313a0-258e-5095-891e-8e4b8fb9a552','欧洲之旅2024','WHR','expense',800,'EUR','food','意式手工冰淇淋Gelateria Artigianale Il Capriccio di Carla Roma Monti','2024-06-17T00:00:00+08','2024-06-17',NULL,NULL,NULL,'pending'),
('08d9a647-a3db-5173-abbe-bd6852eae5a3','欧洲之旅2024','WHR','expense',4500,'EUR','food','Restaurant "La Vittoria"','2024-06-17T00:00:00+08','2024-06-17',NULL,NULL,NULL,'pending'),
('74681860-fb02-5413-8a0c-9a8ed6f64f82','欧洲之旅2024','WHR','expense',900,'EUR','transport','地铁三次票*2','2024-06-17T00:00:00+08','2024-06-17',NULL,NULL,NULL,'pending'),
('8a9072dc-d10f-5b12-80e1-9d95646d28da','欧洲之旅2024','QHB','expense',360,'EUR','food','lucky bar 罚站早餐','2024-06-17T00:00:00+08','2024-06-17',NULL,NULL,NULL,'pending'),
('11570b30-81ec-5f29-8096-66ceb1a0d16b','欧洲之旅2024','WHR','expense',5200,'EUR','food','Taverna dei migliori','2024-06-16T14:07:00+08','2024-06-16',NULL,NULL,NULL,'pending'),
('06159f28-8679-521d-9c5f-4c2105344268','欧洲之旅2024','WHR','expense',710,'EUR','food','麦当劳','2024-06-16T00:00:00+08','2024-06-16',NULL,NULL,NULL,'pending'),
('583bb64b-62bd-565b-8a81-1440cec770ee','欧洲之旅2024','QHB','expense',250,'EUR','shopping','超市买水','2024-06-16T00:00:00+08','2024-06-16',NULL,NULL,NULL,'pending'),
('650d3c03-dda9-5f1b-8221-e59248c9ce1c','欧洲之旅2024','QHB','expense',1600,'EUR','transport','罗马机场到市区的大巴','2024-06-16T00:00:00+08','2024-06-16',NULL,NULL,NULL,'pending'),
('13c7a11d-d629-5354-b227-b434229f4747','泰国之旅2025','QHB','expense',5000,'CNY','transport','公交','2025-02-07T09:41:00+08','2025-02-07',5000,'1','2025-02-07','exact'),
('ed2e2c25-c2ca-5769-b4b5-afdf5f6dd07f','泰国之旅2025','WHR','expense',98200,'CNY','food','The Plu 泰餐','2025-02-07T00:00:00+08','2025-02-07',98200,'1','2025-02-07','exact'),
('bdac3ebd-feab-508e-9328-adb28dffa51f','泰国之旅2025','WHR','expense',12800,'CNY','food','越南粉*5','2025-02-07T00:00:00+08','2025-02-07',12800,'1','2025-02-07','exact'),
('9bc39207-12bc-56e4-8009-64e9f6ece9dd','泰国之旅2025','WHR','expense',8700,'CNY','shopping','便利店 面包水泡面','2025-02-07T00:00:00+08','2025-02-07',8700,'1','2025-02-07','exact'),
('b1237b70-b636-5ca3-83a6-ae2ee284a68f','泰国之旅2025','QHB','expense',16000,'CNY','food','','2025-02-06T20:33:00+08','2025-02-06',16000,'1','2025-02-06','exact'),
('ed539336-3ec2-5591-98c5-47ab53c9901f','泰国之旅2025','QHB','expense',3200,'CNY','transport','','2025-02-06T17:46:00+08','2025-02-06',3200,'1','2025-02-06','exact'),
('9f2f9349-14f1-5f72-bb3d-fa0728e9e3f6','泰国之旅2025','QHB','expense',100000,'CNY','food','自助餐 mungkorn seafood','2025-02-06T17:45:00+08','2025-02-06',100000,'1','2025-02-06','exact'),
('60c36e10-5deb-5c21-a453-0143fe8a9e1d','泰国之旅2025','QHB','expense',17000,'CNY','transport','','2025-02-06T14:00:00+08','2025-02-06',17000,'1','2025-02-06','exact'),
('ee64f15e-7239-502d-bfc9-28f4f7f9fe32','泰国之旅2025','QHB','expense',20000,'CNY','food','粉，水果，鸡腿','2025-02-05T21:49:00+08','2025-02-05',20000,'1','2025-02-05','exact'),
('50163da6-4721-5cc4-9227-a09bf2a8aac2','泰国之旅2025','QHB','expense',15000,'CNY','transport','回酒店','2025-02-05T21:49:00+08','2025-02-05',15000,'1','2025-02-05','exact'),
('a241d5f0-cccb-59be-9b55-89e71bd61615','泰国之旅2025','QHB','expense',17000,'CNY','transport','去金东尼','2025-02-05T17:35:00+08','2025-02-05',17000,'1','2025-02-05','exact'),
('eb300ad7-013e-57a6-a057-c7a4fd643b11','泰国之旅2025','QHB','expense',13000,'CNY','transport','去暹罗百丽宫','2025-02-05T17:04:00+08','2025-02-05',13000,'1','2025-02-05','exact'),
('60882ae1-fd82-5fe5-9a11-78d4d0324e65','泰国之旅2025','QHB','expense',16000,'CNY','shopping','超市','2025-02-05T13:38:00+08','2025-02-05',16000,'1','2025-02-05','exact'),
('070de860-4999-52e5-b98d-8d5a89698c81','泰国之旅2025','QHB','expense',40000,'CNY','food','','2025-02-05T13:38:00+08','2025-02-05',40000,'1','2025-02-05','exact'),
('c8ffe793-f6fc-5fca-a98d-abfc605384a0','泰国之旅2025','QHB','expense',96000,'CNY','tickets','金东尼人妖秀','2025-02-05T00:00:00+08','2025-02-05',96000,'1','2025-02-05','exact'),
('a1abff38-d72a-50fe-a0f9-4c647b6a022b','泰国之旅2025','QHB','expense',187200,'CNY','tickets','海洋馆门票','2025-02-05T00:00:00+08','2025-02-05',187200,'1','2025-02-05','exact'),
('19ce629e-88a4-5b44-aa88-1776f7df3388','泰国之旅2025','WHR','expense',13300,'CNY','transport','iconsiam -酒店','2025-02-04T00:00:00+08','2025-02-04',13300,'1','2025-02-04','exact');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('e724d486-9c85-5d9d-9c1f-4c9986d11f36','泰国之旅2025','WHR','expense',12700,'CNY','transport','大皇宫-iconsiam 十座车','2025-02-04T00:00:00+08','2025-02-04',12700,'1','2025-02-04','exact'),
('b611701a-3189-56be-8401-819dc1057e7f','泰国之旅2025','WHR','expense',20000,'CNY','food','iconsiam 美食广场小吃*7','2025-02-04T00:00:00+08','2025-02-04',20000,'1','2025-02-04','exact'),
('9e418680-fd90-5ea6-84a5-6dcd8ce87a33','泰国之旅2025','WHR','expense',4300,'CNY','food','排骨','2025-02-04T00:00:00+08','2025-02-04',4300,'1','2025-02-04','exact'),
('9ce07e06-1599-5db4-9ed3-d15126d50ccb','泰国之旅2025','WHR','expense',11300,'CNY','food','饮料*6','2025-02-04T00:00:00+08','2025-02-04',11300,'1','2025-02-04','exact'),
('c422eef2-28ab-5833-ad00-a37bf6c027ec','泰国之旅2025','WHR','expense',75850,'CNY','tickets','大皇宫门票*7','2025-02-04T00:00:00+08','2025-02-04',75850,'1','2025-02-04','exact'),
('fbfe6c48-6a3b-5d4a-8e9b-1fad76da3edf','泰国之旅2025','WHR','expense',16300,'CNY','transport','10座车去大皇宫','2025-02-04T00:00:00+08','2025-02-04',16300,'1','2025-02-04','exact'),
('07af23e8-3c17-5e46-9ca7-c04792ab7b14','泰国之旅2025','QHB','expense',15000,'CNY','shopping','','2025-02-03T00:00:00+08','2025-02-03',15000,'1','2025-02-03','exact'),
('476df39b-5437-522b-a672-6f4ee234758e','泰国之旅2025','QHB','expense',100000,'CNY','food','plu 米其林','2025-02-03T00:00:00+08','2025-02-03',100000,'1','2025-02-03','exact'),
('5f9b1119-170b-5ead-bbc4-d2114f521c5c','泰国之旅2025','QHB','expense',40000,'CNY','transport','酒店接机','2025-02-03T00:00:00+08','2025-02-03',40000,'1','2025-02-03','exact'),
('6321f56b-d544-5a2a-9744-33756ee627a1','泰国之旅2025','QHB','expense',42000,'CNY','food','机场','2025-02-03T00:00:00+08','2025-02-03',42000,'1','2025-02-03','exact'),
('e38ab9b6-03a0-5d4c-abc8-e821f1ff17d3','泰国之旅2025','QHB','expense',30000,'CNY','transport','送机','2025-02-03T00:00:00+08','2025-02-03',30000,'1','2025-02-03','exact'),
('1c1f1e76-7062-59d8-ab5d-1a9756d2ce34','泰国之旅2025','QHB','expense',12000,'CNY','hotel','电费','2025-02-03T00:00:00+08','2025-02-03',12000,'1','2025-02-03','exact'),
('a48b7ff4-c4ba-5ab1-8a41-579f2972afc9','泰国之旅2025','QHB','expense',5000,'CNY','transport','回酒店','2025-02-02T00:00:00+08','2025-02-02',5000,'1','2025-02-02','exact'),
('4a07d1f1-f9f8-50b5-be6d-91bc5c090742','泰国之旅2025','QHB','expense',54000,'CNY','entertainment','海豚表演','2025-02-02T00:00:00+08','2025-02-02',54000,'1','2025-02-02','exact'),
('3a625cfd-93bc-5955-b61c-44ff7453cb89','泰国之旅2025','QHB','expense',5000,'CNY','transport','去海豚馆','2025-02-02T00:00:00+08','2025-02-02',5000,'1','2025-02-02','exact'),
('9a7d3a6e-cbc8-5d4a-adec-82cb4f2e6dd2','泰国之旅2025','QHB','expense',25000,'CNY','transport','','2025-02-01T00:00:00+08','2025-02-01',25000,'1','2025-02-01','exact'),
('7cdfc199-a9bc-5987-be5e-8f2cbc763658','泰国之旅2025','QHB','expense',4000,'CNY','shopping','衣服','2025-02-01T00:00:00+08','2025-02-01',4000,'1','2025-02-01','exact'),
('0953ace7-41b0-5ea9-91d4-aa22bc12c787','泰国之旅2025','QHB','expense',80000,'CNY','food','','2025-02-01T00:00:00+08','2025-02-01',80000,'1','2025-02-01','exact'),
('acd5d538-76e3-5f1e-b3f0-402c88b9aa02','泰国之旅2025','QHB','expense',237100,'CNY','entertainment','出海','2025-02-01T00:00:00+08','2025-02-01',237100,'1','2025-02-01','exact'),
('b61ac0e0-dc05-5e45-a6cc-f1650c3405b4','泰国之旅2025','QHB','expense',16000,'CNY','transport','kata 到普吉镇','2025-02-01T00:00:00+08','2025-02-01',16000,'1','2025-02-01','exact'),
('e4671ab6-a44a-505c-8771-e4bc6c49254d','泰国之旅2025','QHB','expense',27000,'CNY','food','','2025-01-31T00:00:00+08','2025-01-31',27000,'1','2025-01-31','exact'),
('cc984ab7-1b9e-5226-be3a-7b4bfcf40418','泰国之旅2025','QHB','expense',30000,'CNY','shopping','衣服','2025-01-31T00:00:00+08','2025-01-31',30000,'1','2025-01-31','exact'),
('fa6ccdd2-67d3-5ee5-a649-e55f7af8b96c','泰国之旅2025','QHB','expense',7000,'CNY','shopping','泳裤和包','2025-01-31T00:00:00+08','2025-01-31',7000,'1','2025-01-31','exact'),
('62417215-dbe3-59fa-bf06-34c4fa68c13c','泰国之旅2025','QHB','expense',53000,'CNY','food','中国餐厅','2025-01-31T00:00:00+08','2025-01-31',53000,'1','2025-01-31','exact'),
('0a0163c5-c68f-52f3-a6ca-6d1c2f0d5331','泰国之旅2025','QHB','expense',16000,'CNY','transport','芭东到卡塔 grab','2025-01-31T00:00:00+08','2025-01-31',16000,'1','2025-01-31','exact');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('7955e9cc-9f74-5c56-9f84-bc9f4bf52f43','泰国之旅2025','QHB','expense',17600,'CNY','health','泡腾片','2025-01-31T00:00:00+08','2025-01-31',17600,'1','2025-01-31','exact'),
('b5eab0a1-a938-52c4-ac83-7a49ddad0946','泰国之旅2025','QHB','expense',20000,'CNY','entertainment','spa','2025-01-30T00:00:00+08','2025-01-30',20000,'1','2025-01-30','exact'),
('a29a45ef-4d06-5f2b-ab61-96994059825c','泰国之旅2025','QHB','expense',12000,'CNY','food','汉堡王','2025-01-30T00:00:00+08','2025-01-30',12000,'1','2025-01-30','exact'),
('d29dbe72-1061-523c-883b-03f9c6b5d9e7','泰国之旅2025','QHB','expense',4200,'CNY','shopping','','2025-01-30T00:00:00+08','2025-01-30',4200,'1','2025-01-30','exact'),
('1bd569a1-ce7a-5d92-869f-1c51e50929f5','泰国之旅2025','QHB','expense',4000,'CNY','shopping','711 简餐','2025-01-29T00:00:00+08','2025-01-29',4000,'1','2025-01-29','exact'),
('4f7df059-79bc-54e9-8ba8-9a43952069d5','泰国之旅2025','QHB','expense',77000,'CNY','shopping','big c','2025-01-29T00:00:00+08','2025-01-29',77000,'1','2025-01-29','exact'),
('6c590959-839f-5fea-840c-1bd9b6bb089e','泰国之旅2025','QHB','expense',60700,'CNY','food','why?not','2025-01-29T00:00:00+08','2025-01-29',60700,'1','2025-01-29','exact'),
('706ffc8d-af40-5d77-9895-1c9fbaccc329','泰国之旅2025','QHB','expense',6000,'CNY','shopping','711','2025-01-29T00:00:00+08','2025-01-29',6000,'1','2025-01-29','exact'),
('58ea2fc7-8e95-51e9-a1e6-38ef6a10bd83','泰国之旅2025','QHB','expense',60000,'CNY','food','蜜月餐厅','2025-01-29T00:00:00+08','2025-01-29',60000,'1','2025-01-29','exact'),
('b76c842e-9fef-549f-9467-7ed472ffb56f','泰国之旅2025','QHB','expense',16000,'CNY','tickets','快速过关','2025-01-28T00:00:00+08','2025-01-28',16000,'1','2025-01-28','exact'),
('92d80f47-0a18-5387-9f9f-94945bec3d99','泰国之旅2025','QHB','expense',15000,'CNY','health','辉儒的保险-不报销','2025-01-27T00:00:00+08','2025-01-27',15000,'1','2025-01-27','exact'),
('c15ea1a2-6ee2-5fbb-9879-2ded1fa3814a','泰国之旅2025','QHB','expense',19100,'CNY','transport','上海送机-不报销','2025-01-27T00:00:00+08','2025-01-27',19100,'1','2025-01-27','exact'),
('e950def7-4e41-57fd-9d09-978fb9253e9a','泰国之旅2025','QHB','expense',517600,'CNY','transport','普吉岛 - 曼谷
机票 597 * 8 = 4776
托运行李 100 * 4 = 400','2025-01-16T00:00:00+08','2025-01-16',517600,'1','2025-01-16','exact'),
('9560fd77-2eea-5929-8a8f-54a8318b189f','泰国之旅2025','QHB','expense',2189400,'CNY','hotel','沙吞雅诗阁大使馆酒店 0203 - 0208
第一晚 2803 * 2间
后续 2036 * 2间 * 4晚','2025-01-12T00:00:00+08','2025-01-12',2189400,'1','2025-01-12','exact'),
('fad26151-2fdc-5826-86eb-fd7ed9e51bf3','泰国之旅2025','QHB','expense',821300,'CNY','hotel','普吉卡伦别墅 0131 - 0203
单晚 2738','2025-01-12T00:00:00+08','2025-01-12',821300,'1','2025-01-12','exact'),
('cc872388-f3fd-515d-9a87-09a136cce240','泰国之旅2025','QHB','expense',1396200,'CNY','hotel','普吉芭东别墅 0128-0131
单晚 4642','2025-01-12T00:00:00+08','2025-01-12',1396200,'1','2025-01-12','exact'),
('1d47b2e7-0631-5d64-8f37-d9b2258051a2','泰国之旅2025','QHB','expense',1685600,'CNY','transport','曼谷 - 上海
单程 2107','2025-01-12T00:00:00+08','2025-01-12',1685600,'1','2025-01-12','exact'),
('576e9d04-28e9-5c79-8403-d57a2f78d755','泰国之旅2025','QHB','expense',2034400,'CNY','transport','上海 - 普吉岛
单程 2543','2025-01-12T00:00:00+08','2025-01-12',2034400,'1','2025-01-12','exact'),
('c7c69e4b-0bff-565a-a4cb-2eab6f6d9fe9','爱法花园装修','WHR','expense',39600,'CNY','shopping','电火锅 落地晾衣架','2022-11-23T12:14:00+08','2022-11-23',39600,'1','2022-11-23','exact'),
('517c15ec-4cb6-5643-bf11-4ceba07a0e80','爱法花园装修','WHR','expense',19000,'CNY','shopping','次卧床头靠枕','2022-11-21T18:28:00+08','2022-11-21',19000,'1','2022-11-21','exact'),
('e0f1cce0-d1d1-57e9-b439-a5e085eb80d3','爱法花园装修','WHR','expense',43000,'CNY','shopping','铁锅 炖锅 汤锅','2022-11-18T16:40:00+08','2022-11-18',43000,'1','2022-11-18','exact'),
('24d66b4a-ef4a-54e2-b17a-36a94c4fa486','爱法花园装修','WHR','expense',27900,'CNY','shopping','铸铁平底锅','2022-11-18T16:37:00+08','2022-11-18',27900,'1','2022-11-18','exact'),
('0ed67b0c-0164-5627-9c16-8ebc849aa02a','爱法花园装修','WHR','expense',22800,'CNY','shopping','晾衣架1.5米','2022-11-09T15:53:00+08','2022-11-09',22800,'1','2022-11-09','exact'),
('7cc6db22-9b83-5116-9d7b-aff12a7dc85d','爱法花园装修','QHB','expense',8000,'CNY','shopping','洗碗机材料','2022-11-05T20:47:00+08','2022-11-05',8000,'1','2022-11-05','exact'),
('4749c1b9-1944-567f-853e-2c4767785a09','爱法花园装修','QHB','expense',4000,'CNY','shopping','净水器开孔','2022-11-05T20:47:00+08','2022-11-05',4000,'1','2022-11-05','exact');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('6d591e9c-0178-5166-998e-d55d22641a9e','爱法花园装修','QHB','expense',14000,'CNY','shopping','安装分机','2022-11-05T20:46:00+08','2022-11-05',14000,'1','2022-11-05','exact'),
('6e5c7499-1c33-5e22-b72c-632751e269c4','爱法花园装修','WHR','expense',19800,'CNY','shopping','两对枕头','2022-11-02T14:53:00+08','2022-11-02',19800,'1','2022-11-02','exact'),
('80d056d9-e5d4-5bba-9b11-c8e3cf53c484','爱法花园装修','WHR','expense',23800,'CNY','shopping','次卧四件套','2022-11-01T00:09:00+08','2022-11-01',23800,'1','2022-11-01','exact'),
('51152a10-6598-5e08-9bf2-eb4d37502287','爱法花园装修','WHR','expense',348800,'CNY','shopping','冰箱','2022-10-31T21:40:00+08','2022-10-31',348800,'1','2022-10-31','exact'),
('f4b6b767-4425-5715-ab39-9b7d937e56f1','爱法花园装修','WHR','expense',16900,'CNY','shopping','洗车机','2022-10-31T21:13:00+08','2022-10-31',16900,'1','2022-10-31','exact'),
('6aa5273a-420d-54c6-a683-5c86cdacac5c','爱法花园装修','WHR','expense',29300,'CNY','shopping','微波炉','2022-10-31T21:12:00+08','2022-10-31',29300,'1','2022-10-31','exact'),
('0430faa4-126b-5583-b25f-8a166a2826b4','爱法花园装修','WHR','expense',16600,'CNY','shopping','热水壶','2022-10-31T21:12:00+08','2022-10-31',16600,'1','2022-10-31','exact'),
('10bcc1fb-6a51-569a-a4b6-acfd2f77bfee','爱法花园装修','WHR','expense',172700,'CNY','shopping','净水器','2022-10-31T21:11:00+08','2022-10-31',172700,'1','2022-10-31','exact'),
('452e1da6-d0f7-5bb5-99f1-bf64f9e6f8ef','爱法花园装修','WHR','expense',378800,'CNY','shopping','电视','2022-10-31T21:11:00+08','2022-10-31',378800,'1','2022-10-31','exact'),
('9bbb6a10-2322-5882-bf45-490aba828548','爱法花园装修','WHR','expense',297500,'CNY','shopping','洗碗机','2022-10-31T21:11:00+08','2022-10-31',297500,'1','2022-10-31','exact'),
('aadc70b6-8e24-57e0-be50-fd344fb750dd','爱法花园装修','WHR','expense',14500,'CNY','shopping','吹风机','2022-10-31T21:10:00+08','2022-10-31',14500,'1','2022-10-31','exact'),
('28a7e1a0-e352-5d95-9170-afa3649ba69b','爱法花园装修','WHR','expense',123000,'CNY','shopping','管线机','2022-10-31T21:10:00+08','2022-10-31',123000,'1','2022-10-31','exact'),
('3f0d0608-2b5b-5af0-a46b-bcfe32287172','爱法花园装修','WHR','expense',165700,'CNY','shopping','人体工学椅2把M57','2022-10-31T21:10:00+08','2022-10-31',165700,'1','2022-10-31','exact'),
('601738ef-75e3-57c0-b8bc-8f35acdc53f9','爱法花园装修','WHR','expense',8400,'CNY','shopping','摄像头','2022-10-31T21:08:00+08','2022-10-31',8400,'1','2022-10-31','exact'),
('13499258-faa0-56c4-859b-82117453ed71','爱法花园装修','WHR','expense',455000,'CNY','shopping','洗烘套装','2022-10-31T21:06:00+08','2022-10-31',455000,'1','2022-10-31','exact'),
('8648835b-7054-5728-9345-adbf4e3b0757','爱法花园装修','WHR','expense',47000,'CNY','shopping','路由器','2022-10-31T21:06:00+08','2022-10-31',47000,'1','2022-10-31','exact'),
('e791c3b7-a708-5baa-b817-89e0166fc99a','爱法花园装修','WHR','expense',51200,'CNY','shopping','四件套','2022-10-31T20:19:00+08','2022-10-31',51200,'1','2022-10-31','exact'),
('43e31123-160e-5b3f-b613-64a04c0dca54','爱法花园装修','QHB','expense',100000,'CNY','shopping','宜家小件','2022-10-30T16:10:00+08','2022-10-30',100000,'1','2022-10-30','exact'),
('e97ae49e-889b-578e-ba8d-c6104f71027b','爱法花园装修','WHR','expense',77500,'CNY','shopping','凉霸 浴霸','2022-10-25T20:58:00+08','2022-10-25',77500,'1','2022-10-25','exact'),
('8e59a681-6dac-5a54-a3ab-83cab82ce53f','爱法花园装修','QHB','expense',8400,'CNY','shopping','摄像头','2022-10-24T23:57:00+08','2022-10-24',8400,'1','2022-10-24','exact'),
('68b0c6db-9ede-5bf9-aa68-6fb5e33b3962','爱法花园装修','QHB','expense',47000,'CNY','shopping','路由器','2022-10-24T11:59:00+08','2022-10-24',47000,'1','2022-10-24','exact'),
('c0de2689-b7d3-577f-9c33-a0f2c9c3f232','爱法花园装修','QHB','expense',50000,'CNY','shopping','马尔姆床头柜','2022-10-23T11:58:00+08','2022-10-23',50000,'1','2022-10-23','exact'),
('72fcb9af-c4e2-5a14-baba-0505e715eade','爱法花园装修','QHB','expense',150000,'CNY','shopping','索德汉沙发框架','2022-10-23T11:57:00+08','2022-10-23',150000,'1','2022-10-23','exact'),
('296acbae-82ed-5a96-b63e-6b881f0e774d','爱法花园装修','QHB','expense',15000,'CNY','shopping','索德汉沙发安装','2022-10-23T00:00:00+08','2022-10-23',15000,'1','2022-10-23','exact'),
('66266fa8-bccb-5fad-a243-4a3065fe21e3','爱法花园装修','QHB','expense',90000,'CNY','shopping','沙发退货','2022-10-20T18:04:00+08','2022-10-20',90000,'1','2022-10-20','exact');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('e2c8fdfe-c1ab-59ae-9644-f0349d07dcfa','爱法花园装修','WHR','expense',64000,'CNY','shopping','索德汉沙发套','2022-10-18T23:14:00+08','2022-10-18',64000,'1','2022-10-18','exact'),
('34af9601-510c-59e8-b7b6-a703e4da82d3','爱法花园装修','WHR','expense',199000,'CNY','shopping','无线吸尘器','2022-10-17T09:44:00+08','2022-10-17',199000,'1','2022-10-17','exact'),
('ee0ac821-36c5-5823-bf10-5ee75ef7d6ec','爱法花园装修','WHR','expense',87500,'CNY','shopping','床垫','2022-10-13T21:08:00+08','2022-10-13',87500,'1','2022-10-13','exact'),
('01e7540e-e595-5aff-a30a-efb9ee725643','爱法花园装修','WHR','expense',87600,'CNY','shopping','床垫','2022-09-30T21:24:00+08','2022-09-30',87600,'1','2022-09-30','exact'),
('7cdabfbc-7b5c-599b-ad3d-3c22e192cf88','爱法花园装修','QHB','expense',120000,'CNY','shopping','煤气改造','2022-09-30T17:55:00+08','2022-09-30',120000,'1','2022-09-30','exact'),
('dedcdbfa-0c1d-5a23-afa2-009ad3be8a31','爱法花园装修','QHB','expense',355000,'CNY','shopping','沙发','2022-09-28T23:46:00+08','2022-09-28',355000,'1','2022-09-28','exact'),
('e50217bd-125a-5046-a67b-ca6e0756522d','爱法花园装修','QHB','expense',10000,'CNY','shopping','投影仪支架','2022-09-25T22:27:00+08','2022-09-25',10000,'1','2022-09-25','exact'),
('55866e02-6b37-58f7-b76a-7355cc175337','爱法花园装修','QHB','expense',570000,'CNY','shopping','装修尾款','2022-09-25T13:50:00+08','2022-09-25',570000,'1','2022-09-25','exact'),
('eaf29f1b-ee95-5b4b-af18-9afc42750ab2','爱法花园装修','WHR','expense',258800,'CNY','shopping','宜家 厨房吊柜，次卧书桌，北阳台吊柜','2022-09-24T17:35:00+08','2022-09-24',258800,'1','2022-09-24','exact'),
('e73d6750-252e-5a4b-ab2d-625ef122668a','爱法花园装修','WHR','expense',13000,'CNY','shopping','窗帘安装','2022-09-16T11:21:00+08','2022-09-16',13000,'1','2022-09-16','exact'),
('7acc1040-9b8d-54fe-b973-70fd3998c724','爱法花园装修','QHB','expense',15000,'CNY','shopping','工具','2022-09-15T09:59:00+08','2022-09-15',15000,'1','2022-09-15','exact'),
('e375282e-d65e-5e38-8839-7b521720aa8a','爱法花园装修','QHB','expense',320000,'CNY','shopping','餐桌 次卧床','2022-08-31T14:23:00+08','2022-08-31',320000,'1','2022-08-31','exact'),
('14f63f22-6ebc-5528-889a-60bc9abd4d40','爱法花园装修','QHB','expense',615000,'CNY','shopping','电视柜 床','2022-08-27T20:53:00+08','2022-08-27',615000,'1','2022-08-27','exact'),
('e7022b31-b02a-563a-b712-64ba0c9b3010','爱法花园装修','QHB','expense',160000,'CNY','shopping','箭牌淋浴房','2022-08-23T20:03:00+08','2022-08-23',160000,'1','2022-08-23','exact'),
('0517ecdc-ebfc-5713-9362-89b6a129e9e2','爱法花园装修','QHB','expense',13500,'CNY','health','慢严舒柠','2022-08-20T12:08:00+08','2022-08-20',13500,'1','2022-08-20','exact'),
('c9e90f8b-e893-53a5-a4f5-ffd0af3d08ea','爱法花园装修','QHB','expense',7500,'CNY','food','','2022-08-19T00:00:00+08','2022-08-19',7500,'1','2022-08-19','exact'),
('a1aecd25-fd62-521b-a4ab-eb0e89805750','爱法花园装修','QHB','expense',160000,'CNY','shopping','南阳台书桌','2022-08-16T23:22:00+08','2022-08-16',160000,'1','2022-08-16','exact'),
('0eb3b302-688b-5112-a5d3-c3782ff919b5','爱法花园装修','WHR','expense',9100,'CNY','shopping','主卧阳台窗帘补差价','2022-08-15T20:50:00+08','2022-08-15',9100,'1','2022-08-15','exact'),
('246fcb9c-fa10-5d7a-87bd-a5698f000328','爱法花园装修','WHR','expense',109900,'CNY','shopping','鞋柜','2022-08-15T20:50:00+08','2022-08-15',109900,'1','2022-08-15','exact'),
('5ea52cc9-4e35-5ef1-8bc4-f13f391ca6b1','爱法花园装修','WHR','expense',75300,'CNY','shopping','次卧罗马帘*2百叶帘*1','2022-08-11T21:42:00+08','2022-08-11',75300,'1','2022-08-11','exact'),
('6c4ede55-805c-5554-8148-ce465cb2b17e','爱法花园装修','WHR','expense',9900,'CNY','shopping','玻璃胶','2022-08-11T14:14:00+08','2022-08-11',9900,'1','2022-08-11','exact'),
('525191ca-6553-58e1-9cb1-409de5eb5915','爱法花园装修','QHB','expense',25000,'CNY','shopping','手持吸尘器','2022-08-11T14:11:00+08','2022-08-11',25000,'1','2022-08-11','exact'),
('24b6897b-f2a9-5f05-b581-bdd680a775b3','爱法花园装修','QHB','expense',6600,'CNY','shopping','洗衣机龙头','2022-08-11T12:16:00+08','2022-08-11',6600,'1','2022-08-11','exact'),
('d05a7a4f-6ba3-5391-b77f-7d64e915664b','爱法花园装修','QHB','expense',24000,'CNY','shopping','浴室凳','2022-08-11T11:52:00+08','2022-08-11',24000,'1','2022-08-11','exact'),
('2b49c242-329e-58d7-8f04-290bdd14e94f','爱法花园装修','WHR','expense',115800,'CNY','shopping','主卧阳台布帘+纱帘+轨道','2022-08-10T21:39:00+08','2022-08-10',115800,'1','2022-08-10','exact');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('a2cba4ba-0126-597d-be7a-32b7a5df5ace','爱法花园装修','QHB','expense',15000,'CNY','shopping','人字梯','2022-08-10T21:33:00+08','2022-08-10',15000,'1','2022-08-10','exact'),
('c4ec5585-0f0f-567b-b0e4-f271cf321cac','爱法花园装修','QHB','expense',193500,'CNY','shopping','马桶加卫洗丽','2022-08-09T22:17:00+08','2022-08-09',193500,'1','2022-08-09','exact'),
('f28da069-68aa-5afd-8ade-3d1c773da1bc','爱法花园装修','QHB','expense',32500,'CNY','shopping','拖把池','2022-08-09T22:15:00+08','2022-08-09',32500,'1','2022-08-09','exact'),
('29cc216d-3169-5d94-8890-fb5d78bc2796','爱法花园装修','WHR','expense',159000,'CNY','shopping','淘宝浴室柜+50定制费','2022-08-08T20:09:00+08','2022-08-08',159000,'1','2022-08-08','exact'),
('c09586f8-b1e8-5ec8-8cc3-a5fbaacf586d','爱法花园装修','QHB','expense',112000,'CNY','shopping','花洒','2022-08-08T00:00:00+08','2022-08-08',112000,'1','2022-08-08','exact'),
('160ad0a0-8891-5db4-b4b1-b6b882fe2306','爱法花园装修','QHB','expense',536000,'CNY','home','屋顶防水','2022-08-06T16:10:00+08','2022-08-06',536000,'1','2022-08-06','exact'),
('91d63825-96dc-580a-8b7b-5a53d3caf604','爱法花园装修','WHR','expense',60000,'CNY','home','地板安装增项','2022-08-04T13:36:00+08','2022-08-04',60000,'1','2022-08-04','exact'),
('5f006ff3-179e-5bd9-81ff-969f18c83774','爱法花园装修','QHB','expense',125500,'CNY','home','灯具','2022-07-31T23:55:00+08','2022-07-31',125500,'1','2022-07-31','exact'),
('d339ac07-8d05-56bd-a67d-07af3fd3c6be','爱法花园装修','QHB','expense',36000,'CNY','home','成员金额：QHB：360.00,备注：记录人：QHB。换气扇','2022-07-19T12:27:00+08','2022-07-19',36000,'1','2022-07-19','exact'),
('20c4396e-30a4-54b6-aa14-1e0dbe10b84e','爱法花园装修','QHB','expense',600000,'CNY','home','成员金额：QHB：6000.00,备注：记录人：QHB','2022-07-18T21:22:00+08','2022-07-18',600000,'1','2022-07-18','exact'),
('b4113325-8b00-59da-be6c-3841fb9e1fb0','爱法花园装修','QHB','expense',4000,'CNY','home','成员金额：QHB：40.00,备注：记录人：QHB。楼宇对讲电话','2022-07-17T01:06:00+08','2022-07-17',4000,'1','2022-07-17','exact'),
('ca71c8e0-8536-57c9-8cf5-4e6c9236870d','爱法花园装修','QHB','expense',1300000,'CNY','home','成员金额：WHR：13000.00,备注：记录人：WHR。三期款决算增项—黄经理','2022-07-09T17:34:00+08','2022-07-09',1300000,'1','2022-07-09','exact'),
('b583acca-d0bb-5b6a-8251-1c6eafb3a71a','爱法花园装修','QHB','expense',2487900,'CNY','home','成员金额：WHR：24879.00,备注：记录人：WHR。三期款—装修公司','2022-07-09T17:31:00+08','2022-07-09',2487900,'1','2022-07-09','exact'),
('5c9b3fc4-e1ae-572d-acdd-0b9f9d868695','爱法花园装修','QHB','expense',60000,'CNY','home','标签：水槽,成员金额：QHB：600.00,备注：记录人：QHB。水槽','2022-07-07T21:03:00+08','2022-07-07',60000,'1','2022-07-07','exact'),
('8f1b7728-8c6e-55a7-a8f8-ad2ffb47cb65','爱法花园装修','QHB','expense',400000,'CNY','home','成员金额：QHB：4000.00,备注：记录人：QHB。方太烟机灶具','2022-07-07T21:02:00+08','2022-07-07',400000,'1','2022-07-07','exact'),
('a4f350b0-95a9-5313-9e85-3e0fd86074db','爱法花园装修','QHB','expense',800600,'CNY','home','成员金额：WHR：8006.00,备注：记录人：WHR。旺邦木门余款：2木门，2铝合金门，4门套，45米踢脚线，2门锁','2022-07-05T15:56:00+08','2022-07-05',800600,'1','2022-07-05','exact'),
('aec805cb-a65b-5aea-afd5-f4fa858a20e8','爱法花园装修','QHB','expense',124300,'CNY','home','成员金额：QHB：1243.00,备注：记录人：QHB。隔断双层钢化玻璃和方框','2022-07-05T11:50:00+08','2022-07-05',124300,'1','2022-07-05','exact'),
('c6b3a2c2-238c-55e1-8c19-2ca5b91fd5f9','爱法花园装修','QHB','expense',136150,'CNY','home','成员金额：WHR：1361.50,备注：记录人：WHR。补货，瓷砖1249.2+112上楼费','2022-06-28T10:04:00+08','2022-06-28',136150,'1','2022-06-28','exact'),
('8364f896-d52f-5c62-bd2e-bad66e7a3ba0','爱法花园装修','QHB','expense',1190000,'CNY','home','成员金额：QHB：11900.00,备注：记录人：QHB。宜家厨房 量房押金要去宜家退','2022-06-26T18:18:00+08','2022-06-26',1190000,'1','2022-06-26','exact'),
('274c1eab-dadc-5b64-91ea-41c2396d44e4','爱法花园装修','QHB','expense',100000,'CNY','home','成员金额：WHR：1000.00,备注：记录人：WHR。旺邦木门定金','2022-06-26T17:23:00+08','2022-06-26',100000,'1','2022-06-26','exact'),
('3e06ac01-2bdf-5de9-af8e-cb61ff641fd6','爱法花园装修','QHB','expense',700000,'CNY','home','成员金额：QHB：7000.00,备注：记录人：QHB。窗户2期','2022-06-11T10:34:00+08','2022-06-11',700000,'1','2022-06-11','exact'),
('70c46371-5392-5c6c-8689-3538506bf199','爱法花园装修','QHB','expense',220000,'CNY','home','成员金额：WHR：2200.00,备注：记录人：WHR。瓷砖尾款','2022-06-09T13:10:00+08','2022-06-09',220000,'1','2022-06-09','exact'),
('3dbe6afc-6f9d-59a0-82c3-2dc217b87416','爱法花园装修','QHB','expense',100000,'CNY','home','成员金额：WHR：1000.00,备注：记录人：WHR。防盗门尾款','2022-06-09T09:43:00+08','2022-06-09',100000,'1','2022-06-09','exact'),
('fc1f747d-cc7b-5d54-93c4-3a81d9f69e38','爱法花园装修','QHB','expense',123000,'CNY','home','成员金额：QHB：1230.00,备注：记录人：QHB。鹿客指纹锁','2022-06-07T10:04:00+08','2022-06-07',123000,'1','2022-06-07','exact');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('5fa8d278-dad6-5fcf-8fe9-587bbc980812','爱法花园装修','QHB','expense',651200,'CNY','home','成员金额：WHR：6512.00,备注：记录人：WHR。瓷砖一期款，2000待付','2022-03-27T18:01:00+08','2022-03-27',651200,'1','2022-03-27','exact'),
('5955320d-f675-5d6e-89eb-760aab2479c6','爱法花园装修','QHB','expense',200000,'CNY','home','成员金额：WHR：2000.00,备注：记录人：WHR。王力安全门一期款，剩余1000','2022-03-26T17:59:00+08','2022-03-26',200000,'1','2022-03-26','exact'),
('df8f928f-400e-5346-ae09-9a7d31ad5179','爱法花园装修','QHB','expense',30000,'CNY','home','成员金额：QHB：300.00,备注：记录人：QHB。空调搬运','2022-03-16T19:26:00+08','2022-03-16',30000,'1','2022-03-16','exact'),
('5c955299-4424-5956-b944-85b37909a97a','爱法花园装修','QHB','expense',3990000,'CNY','home','成员金额：WHR：39900.00,备注：记录人：WHR。装修二期款','2022-03-08T09:20:00+08','2022-03-08',3990000,'1','2022-03-08','exact'),
('8cabceda-1335-5f62-a01b-b5fcd71bfdb8','爱法花园装修','QHB','expense',4450,'CNY','home','成员金额：WHR：44.50,备注：记录人：WHR。货运电线','2022-03-01T18:37:00+08','2022-03-01',4450,'1','2022-03-01','exact'),
('d77f0df0-643a-5787-bf75-266d3ece29b5','爱法花园装修','QHB','expense',1000000,'CNY','home','标签：窗户,成员金额：QHB：10000.00,备注：记录人：QHB。
预付 10000 窗户','2022-02-27T13:59:00+08','2022-02-27',1000000,'1','2022-02-27','exact'),
('be4e92cd-80ff-5f26-999d-3d64bc57af48','爱法花园装修','QHB','expense',9900,'CNY','home','成员金额：QHB：99.00,备注：记录人：QHB。绿联HDMI 2.0 8米','2022-02-21T09:04:00+08','2022-02-21',9900,'1','2022-02-21','exact'),
('dd697a51-85a4-572b-b251-4136a6085095','爱法花园装修','QHB','expense',14900,'CNY','home','成员金额：QHB：149.00,备注：记录人：QHB。绿联HDMI2.0 10米','2022-02-21T09:03:00+08','2022-02-21',14900,'1','2022-02-21','exact'),
('72211277-af05-570b-b5d4-b38a84b9acb8','爱法花园装修','QHB','expense',24900,'CNY','home','成员金额：QHB：249.00,备注：记录人：QHB。绿联6类网线非屏蔽100米','2022-02-21T09:02:00+08','2022-02-21',24900,'1','2022-02-21','exact'),
('b3d76199-9672-59b9-982b-fbd0afd29567','爱法花园装修','QHB','expense',1290,'CNY','home','成员金额：QHB：12.90,备注：记录人：QHB。绿联六类线水晶头','2022-02-21T09:01:00+08','2022-02-21',1290,'1','2022-02-21','exact'),
('85bb4043-8c27-5c2a-b3d6-1345bd39070c','爱法花园装修','QHB','expense',10000,'CNY','home','成员金额：QHB：100.00,备注：记录人：QHB。宜家橱柜测量费','2022-01-08T16:05:00+08','2022-01-08',10000,'1','2022-01-08','exact'),
('2e863e56-d255-52d6-b499-01749c93f7b7','爱法花园装修','QHB','expense',550000,'CNY','home','成员金额：QHB：5500.00,备注：记录人：QHB。楼梯','2022-01-02T15:42:00+08','2022-01-02',550000,'1','2022-01-02','exact'),
('ca7f1c24-a18f-5127-81a6-d1ab8c8279b3','爱法花园装修','QHB','expense',18800,'CNY','home','成员金额：WHR：188.00,备注：记录人：WHR。宜山路瓷砖定金，按照元旦优惠','2022-01-01T19:38:00+08','2022-01-01',18800,'1','2022-01-01','exact'),
('eaa71ab2-6bf7-5e6a-b26f-0c8a09f03a35','爱法花园装修','QHB','income',192000,'CNY','other-income','成员金额：财主4071670709：1920.00,备注：记录人：AssKicker。卖旧
2个空调 1500
热水器 50
微波炉 20
冰箱洗衣机 150
家具 200','2021-12-28T18:52:00+08','2021-12-28',192000,'1','2021-12-28','exact'),
('d46fad00-f801-547e-8823-941c11873a3b','爱法花园装修','QHB','expense',306000,'CNY','home','标签：垃圾,成员金额：QHB：3060.00,备注：记录人：QHB。清运 垃圾','2021-12-26T16:36:00+08','2021-12-26',306000,'1','2021-12-26','exact'),
('8f9b88a0-6b3b-5ac6-aa01-52010d6551c0','爱法花园装修','QHB','expense',1390000,'CNY','home','成员金额：QHB：13900.00,备注：记录人：QHB。威能地暖','2021-12-18T18:16:00+08','2021-12-18',1390000,'1','2021-12-18','exact'),
('3f8c0f7a-20dc-5906-a066-2c6c9929eea7','爱法花园装修','QHB','expense',3000000,'CNY','home','成员金额：QHB：30000.00,备注：记录人：QHB。格力中央空调','2021-12-18T18:15:00+08','2021-12-18',3000000,'1','2021-12-18','exact'),
('e5f90c3c-eca0-58ee-af9c-e6f99595c8cb','爱法花园装修','QHB','expense',280000,'CNY','home','成员金额：QHB：2800.00,备注：记录人：QHB。装修监理','2021-12-15T15:41:00+08','2021-12-15',280000,'1','2021-12-15','exact'),
('f6a68805-5ff1-55b8-abc6-55e98638084a','爱法花园装修','QHB','expense',672000,'CNY','home','成员金额：QHB：6720.00,备注：记录人：QHB','2021-11-29T12:22:00+08','2021-11-29',672000,'1','2021-11-29','exact'),
('682d2570-762b-510c-a19a-06edd343b2f0','爱法花园装修','QHB','expense',3430000,'CNY','home','成员金额：QHB：34300.00,备注：记录人：QHB','2020-12-19T17:30:00+08','2020-12-19',3430000,'1','2020-12-19','exact'),
('8fc19969-b001-5b95-b79a-f1d782948916','育儿支出','WHR','expense',28750,'CNY','shopping','轮状','2025-10-28T00:00:00+08','2025-10-28',28750,'1','2025-10-28','exact'),
('a4127634-a6dd-5325-889a-c8050a9ae3b3','育儿支出','WHR','expense',65150,'CNY','shopping','五联第一针','2025-10-14T22:27:00+08','2025-10-14',65150,'1','2025-10-14','exact'),
('d5e93e81-f120-5075-8bd1-4cf6ba73a52e','育儿支出','WHR','expense',89900,'CNY','shopping','十三价肺炎+轮状疫苗 第一次','2025-09-16T00:00:00+08','2025-09-16',89900,'1','2025-09-16','exact'),
('e4e840c2-22db-500e-a666-2d689540d3de','育儿支出','WHR','expense',35500,'CNY','health','2025年宝宝医保','2025-08-15T11:04:00+08','2025-08-15',35500,'1','2025-08-15','exact'),
('b2e0b0bb-397a-5645-b6a3-cc5671fc6365','育儿支出','WHR','expense',3220000,'CNY','shopping','葱妈月嫂费用8.4-9.25','2025-08-11T14:17:00+08','2025-08-11',3220000,'1','2025-08-11','exact');
INSERT INTO _import_entries (id, source_name, owner_name, entry_type, amount, currency, category_id, note, occurred_at, exchange_rate_date, base_amount, exchange_rate, exchange_rate_effective_date, conversion_status) VALUES
('5823920e-1435-5794-961f-cb280f82f220','育儿支出','WHR','expense',50000,'CNY','shopping','二手tutti婴儿床','2025-06-21T19:28:00+08','2025-06-21',50000,'1','2025-06-21','exact'),
('311aee1b-a937-556e-aab9-ac5f8598d068','育儿支出','WHR','expense',8781,'CNY','shopping','贝亲奶瓶160ml+SS奶嘴','2025-05-16T20:14:00+08','2025-05-16',8781,'1','2025-05-16','exact'),
('bb3f2a84-3173-55f0-913a-c2d450efc596','育儿支出','WHR','expense',18615,'CNY','shopping','可优比尿布台','2025-05-16T20:07:00+08','2025-05-16',18615,'1','2025-05-16','exact');

INSERT INTO entries (id, owner_id, type, amount, currency, base_currency, base_amount, exchange_rate, exchange_rate_date, exchange_rate_effective_date, exchange_rate_source, conversion_status, category_id, note, occurred_at, created_by, updated_by, created_at, updated_at, deleted_at, version)
SELECT d.id, u.id, d.entry_type, d.amount, d.currency, 'CNY', d.base_amount, d.exchange_rate, d.exchange_rate_date, d.exchange_rate_effective_date, 'system', d.conversion_status, d.category_id, d.note, d.occurred_at, u.id, u.id, d.occurred_at, d.occurred_at, NULL, 1 FROM _import_entries d JOIN _import_users u ON u.name = d.owner_name ON CONFLICT (id) DO NOTHING;
INSERT INTO entry_ledgers (entry_id, ledger_id) SELECT d.id, l.id FROM _import_entries d JOIN _import_ledgers l ON l.source_name = d.source_name ON CONFLICT (entry_id, ledger_id) DO UPDATE SET unlinked_at = NULL, updated_at = now();
INSERT INTO entry_ledgers (entry_id, ledger_id) SELECT d.id, p.ledger_id FROM _import_entries d JOIN _import_users u ON u.name = d.owner_name JOIN _import_personal p ON p.user_id = u.id ON CONFLICT (entry_id, ledger_id) DO UPDATE SET unlinked_at = NULL, updated_at = now();
COMMIT;
