devicd_no
Build docker and publish / build (20.15.1) (push) Successful in 7m58s

This commit is contained in:
2026-03-17 08:37:36 -07:00
parent dcdbabdb13
commit 4b528184ea
4 changed files with 130 additions and 102 deletions
@@ -551,5 +551,37 @@ CREATE TABLE IF NOT EXISTS `server_rule_group`
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `user_family`
(
`id` bigint NOT NULL AUTO_INCREMENT,
`owner_user_id` bigint NOT NULL COMMENT 'Owner User ID',
`max_members` int NOT NULL DEFAULT 5 COMMENT 'Max members in family',
`status` tinyint NOT NULL DEFAULT 1 COMMENT 'Status: 1=active, 0=disabled',
`created_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updated_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
`deleted_at` datetime(3) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uniq_owner_user_id`(`owner_user_id` ASC) USING BTREE,
INDEX `idx_status`(`status` ASC) USING BTREE,
INDEX `idx_deleted_at`(`deleted_at` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 485 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `user_family_member` (
`id` bigint NOT NULL AUTO_INCREMENT,
`family_id` bigint NOT NULL COMMENT 'Family ID',
`user_id` bigint NOT NULL COMMENT 'Member User ID',
`role` tinyint NOT NULL DEFAULT 2 COMMENT 'Role: 1=owner, 2=member',
`status` tinyint NOT NULL DEFAULT 1 COMMENT 'Status: 1=active, 2=left, 3=removed',
`join_source` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Join source',
`joined_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`left_at` datetime(3) NULL DEFAULT NULL,
`created_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updated_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
`deleted_at` datetime(3) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uniq_user_id`(`user_id` ASC) USING BTREE,
INDEX `idx_family_status`(`family_id` ASC, `status` ASC) USING BTREE,
INDEX `idx_deleted_at`(`deleted_at` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 510 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;
SET FOREIGN_KEY_CHECKS = 1;