feat(db): event_salesperson table and BO_EVENTS module
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
246fec3c7b
commit
814c51da3d
5 files changed
+48
-1
No files matched your search
@@ -0,0 +1,16 @@
|
||||
-- Co-Lite change 3: each event's team of salespeople.
|
||||
-- Target: `service-counter`. Additive only. Run once.
|
||||
-- user_id points at `service-system`.`user` (another schema), so there is no foreign key; mobile-api checks it on write.
|
||||
USE `service-counter`;
|
||||
|
||||
CREATE TABLE `event_salesperson` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`company_id` bigint NOT NULL,
|
||||
`event_uuid` bigint NOT NULL,
|
||||
`user_id` bigint NOT NULL,
|
||||
`create_by` varchar(255) DEFAULT NULL,
|
||||
`create_date_time` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_event_salesperson_event_user` (`event_uuid`, `user_id`),
|
||||
KEY `idx_event_salesperson_event` (`event_uuid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
@@ -0,0 +1,6 @@
|
||||
-- Co-Lite change 3: Events back-office module (area BO).
|
||||
-- Target: `service-system`.`module`. Additive only. Run once.
|
||||
USE `service-system`;
|
||||
|
||||
INSERT INTO `module` (`id`, `name`, `desc`, `area`, `type`, `parent`, `url`, `icon_name`) VALUES
|
||||
(40100000, 'BO_EVENTS', 'Events', 'BO', 'M', 40000000, '/events', 'CalendarDays');
|
||||
@@ -0,0 +1,7 @@
|
||||
-- Rollback for add-admin-events. Drops the team table and the Events module with its grants.
|
||||
USE `service-system`;
|
||||
DELETE FROM `modules_roles` WHERE `module_id` = 40100000;
|
||||
DELETE FROM `module` WHERE `id` = 40100000;
|
||||
|
||||
USE `service-counter`;
|
||||
DROP TABLE IF EXISTS `event_salesperson`;
|
||||
Reference in new issue
Block a user