feat: add department creation endpoint and request validation

This commit is contained in:
siujamo
2026-03-23 15:13:23 +08:00
parent 7b9849c311
commit aebb693ee7
9 changed files with 146 additions and 41 deletions
@@ -409,4 +409,21 @@ FROM system_menu;
INSERT INTO menu (name, parent_id, code, sort, path, is_external_link, is_visible, status,
authority_code, icon, created_at, updated_at)
VALUES ('Helix 官网', null, 'helix-official-site', 100, 'https://helix.onixbyte.com', true, true,
'ACTIVE'::STATUS, null, null, NOW(), NOW());
'ACTIVE'::STATUS, null, null, NOW(), NOW());
DO
$$
DECLARE
v_user_id BIGINT;
v_now TIMESTAMP;
BEGIN
SELECT id INTO v_user_id FROM "user" WHERE username = 'helix';
v_now := CURRENT_TIMESTAMP;
RAISE NOTICE 'User ID: %, Timestamp: %', v_user_id, v_now;
-- Default password is '123456'
INSERT INTO "user_credential"
VALUES (v_user_id, 'LOCAL'::credential_provider, '$2a$10$1LoatLVvHL3LFK0pnNXcM.eiPK6.UdA9cl9IDwanWHBAAILn1xe0K', v_now, v_now);
END;
$$;