You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lyr-one-test/sql/20231108-electronic_finance...

90 lines
5.9 KiB
Java

SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- for electronic_finance
-- ----------------------------
DROP TABLE IF EXISTS `electronic_finance`;
CREATE TABLE `electronic_finance`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '',
`create_by` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`company_id` bigint DEFAULT NULL COMMENT 'id',
`company` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`user_id` bigint DEFAULT NULL COMMENT 'id',
`dept_id` bigint DEFAULT NULL COMMENT 'id',
`dept_name` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`account` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`project` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`Invoice_number` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '/',
`price` decimal(20, 2) DEFAULT NULL COMMENT '',
`status` varchar(2) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`position` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`cherks` int DEFAULT NULL COMMENT '',
`record_id` bigint DEFAULT NULL COMMENT 'id',
`trade_type` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`pay_type` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`file_status` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`contract_attachment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`remarks` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`creator` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`updater` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`create_time` datetime DEFAULT NULL COMMENT '',
`update_time` datetime DEFAULT NULL COMMENT '',
`trade_date` datetime DEFAULT NULL COMMENT '',
`record_time` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`tenant_id` bigint NOT NULL COMMENT '',
`deleted` bit(1) DEFAULT b'0' COMMENT '',
PRIMARY KEY (`id`) USING BTREE,
KEY `IX_electronic_finance_tenant_id` (`tenant_id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = DYNAMIC COMMENT ='';
-- id
SELECT `id`
INTO @menuId
FROM `system_menu`
WHERE `name` = '';
-- SQL
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status, component_name)
VALUES ('', '', 2, 0, @menuId,
'electronic-finance', 'clipboard', 'ea/electronicFinance/index', 0, 'ElectronicFinance');
-- ID
-- MySQL OraclePostgreSQLSQLServer @parentId
SELECT @parentId := LAST_INSERT_ID();
-- SQL
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:query', 3, 1, @parentId,
'', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:create', 3, 2, @parentId,
'', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:update', 3, 3, @parentId,
'', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:delete', 3, 4, @parentId,
'', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:export', 3, 5, @parentId,
'', '', '', 0);
-- -
INSERT INTO `lyr-one`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`,
`css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`,
`deleted`)
VALUES (null, '10', '', 'electronic_finance', 'archives_file_type', '0', 'default', '', NULL, '',
'2023-11-08 15:13:50', '', '2023-11-08 15:14:08', b'0');