-- 户外招聘会石河子 mock 数据
-- 可重复执行：按 title 去重，已存在同名招聘会时不会重复插入。

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年石河子市春季户外综合招聘会',
    '第八师石河子市人力资源和社会保障局',
    '综合类',
    '第八师（石河子市）',
    '石河子市北三路石河子大学中区图书馆前广场',
    80,
    TIMESTAMP '2026-03-15 09:00:00',
    TIMESTAMP '2026-03-15 17:00:00',
    TIMESTAMP '2026-03-01 00:00:00',
    TIMESTAMP '2026-03-10 23:59:59',
    TRUE,
    'https://picsum.photos/seed/shihezi-outdoor-1/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年石河子市春季户外综合招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年石河子大学毕业生户外专场招聘会',
    '石河子大学就业指导中心',
    '校园招聘',
    '第八师（石河子市）',
    '石河子大学中区主楼前广场',
    60,
    TIMESTAMP '2026-04-18 09:30:00',
    TIMESTAMP '2026-04-18 16:30:00',
    TIMESTAMP '2026-04-01 00:00:00',
    TIMESTAMP '2026-04-12 23:59:59',
    TRUE,
    'https://picsum.photos/seed/shihezi-outdoor-2/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年石河子大学毕业生户外专场招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年石河子经开区制造业户外招聘会',
    '石河子经济技术开发区管委会',
    '行业专场',
    '第八师（石河子市）',
    '石河子经济技术开发区企业服务中心广场',
    100,
    TIMESTAMP '2026-05-16 09:00:00',
    TIMESTAMP '2026-05-16 17:30:00',
    TIMESTAMP '2026-04-25 00:00:00',
    TIMESTAMP '2026-05-10 23:59:59',
    TRUE,
    'https://picsum.photos/seed/shihezi-outdoor-3/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年石河子经开区制造业户外招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年石河子市高新区数字经济户外招聘会',
    '石河子高新技术产业开发区管理委员会',
    '高新技术专场',
    '第八师（石河子市）',
    '石河子高新区科技企业孵化器广场',
    55,
    TIMESTAMP '2026-06-20 09:00:00',
    TIMESTAMP '2026-06-20 16:30:00',
    TIMESTAMP '2026-06-01 00:00:00',
    TIMESTAMP '2026-06-14 23:59:59',
    TRUE,
    'https://picsum.photos/seed/shihezi-outdoor-4/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年石河子市高新区数字经济户外招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年石河子军垦文化广场服务业招聘会',
    '石河子市就业服务中心',
    '服务业专场',
    '第八师（石河子市）',
    '石河子市军垦文化广场',
    45,
    TIMESTAMP '2026-07-11 10:00:00',
    TIMESTAMP '2026-07-11 17:00:00',
    TIMESTAMP '2026-06-20 00:00:00',
    TIMESTAMP '2026-07-05 23:59:59',
    FALSE,
    'https://picsum.photos/seed/shihezi-outdoor-5/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年石河子军垦文化广场服务业招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年第八师团场农业技术人才户外招聘会',
    '第八师农业农村局',
    '行业专场',
    '第八师（石河子市）',
    '石河子市人民广场东侧',
    50,
    TIMESTAMP '2026-08-08 09:00:00',
    TIMESTAMP '2026-08-08 17:00:00',
    TIMESTAMP '2026-07-20 00:00:00',
    TIMESTAMP '2026-08-02 23:59:59',
    FALSE,
    'https://picsum.photos/seed/shihezi-outdoor-6/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年第八师团场农业技术人才户外招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年石河子市金秋就业援助户外招聘会',
    '石河子市公共就业和人才服务中心',
    '就业援助专场',
    '第八师（石河子市）',
    '石河子市幸福路步行街广场',
    70,
    TIMESTAMP '2026-09-19 09:30:00',
    TIMESTAMP '2026-09-19 17:30:00',
    TIMESTAMP '2026-09-01 00:00:00',
    TIMESTAMP '2026-09-13 23:59:59',
    TRUE,
    'https://picsum.photos/seed/shihezi-outdoor-7/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年石河子市金秋就业援助户外招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年石河子市文旅商贸户外招聘会',
    '石河子市文化体育广电和旅游局',
    '文旅专场',
    '第八师（石河子市）',
    '石河子市北湖公园游客服务中心广场',
    40,
    TIMESTAMP '2026-10-24 10:00:00',
    TIMESTAMP '2026-10-24 17:00:00',
    TIMESTAMP '2026-10-01 00:00:00',
    TIMESTAMP '2026-10-18 23:59:59',
    FALSE,
    'https://picsum.photos/seed/shihezi-outdoor-8/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年石河子市文旅商贸户外招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年石河子市高校毕业生冬季户外招聘会',
    '石河子市公共就业和人才服务中心',
    '高校毕业生专场',
    '第八师（石河子市）',
    '石河子市会展中心南广场',
    65,
    TIMESTAMP '2026-11-14 09:30:00',
    TIMESTAMP '2026-11-14 16:30:00',
    TIMESTAMP '2026-10-25 00:00:00',
    TIMESTAMP '2026-11-08 23:59:59',
    TRUE,
    'https://picsum.photos/seed/shihezi-outdoor-9/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年石河子市高校毕业生冬季户外招聘会');

INSERT INTO "cms_outdoor_fair" (
    "title", "host_unit", "fair_type", "region", "address", "booth_count",
    "hold_time", "end_time", "apply_start_time", "apply_end_time",
    "online_apply", "photo_url", "create_by", "create_time", "update_by", "update_time", "del_flag"
)
SELECT
    '2026年第八师石河子市年末就业帮扶户外招聘会',
    '第八师石河子市人力资源和社会保障局',
    '就业援助专场',
    '第八师（石河子市）',
    '石河子市人民广场西侧',
    75,
    TIMESTAMP '2026-12-12 10:00:00',
    TIMESTAMP '2026-12-12 17:00:00',
    TIMESTAMP '2026-11-20 00:00:00',
    TIMESTAMP '2026-12-06 23:59:59',
    TRUE,
    'https://picsum.photos/seed/shihezi-outdoor-10/400/300',
    'system',
    NOW(),
    'system',
    NOW(),
    '0'
WHERE NOT EXISTS (SELECT 1 FROM "cms_outdoor_fair" WHERE "title" = '2026年第八师石河子市年末就业帮扶户外招聘会');

-- 测试环境曾软删除同名 mock 数据时，恢复为可见状态；不写入任何企业或企业关联数据。
UPDATE "cms_outdoor_fair"
SET "del_flag" = '0',
    "update_by" = 'system',
    "update_time" = NOW()
WHERE "title" IN (
    '2026年石河子市春季户外综合招聘会',
    '2026年石河子大学毕业生户外专场招聘会',
    '2026年石河子经开区制造业户外招聘会',
    '2026年石河子市高新区数字经济户外招聘会',
    '2026年石河子军垦文化广场服务业招聘会',
    '2026年第八师团场农业技术人才户外招聘会',
    '2026年石河子市金秋就业援助户外招聘会',
    '2026年石河子市文旅商贸户外招聘会',
    '2026年石河子市高校毕业生冬季户外招聘会',
    '2026年第八师石河子市年末就业帮扶户外招聘会'
);
