Files
youlai-boot/sql/ttstd/sn_home_layout.sql
T

33 lines
1.9 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- =============================================================================
-- 设备首页分页布局表(sys_sn_home_layout)
-- 说明:家属端可远程调整老人端(ElderlyDialer)桌面首页的分页顺序与默认页。
-- page_order 为逗号分隔的页面槽位顺序,取值:
-- settings - 设置页
-- contact - 联系人页
-- home - 首页(天气/时间/应用宫格)
-- apps - 应用页,数量随安装应用动态生成,恒排在最后,不参与排序
-- default_page 为开机 / 按 Home 键时展示的页面,必须是 page_order 中的槽位。
-- 无记录的设备按默认布局处理(settings,contact,home + home),
-- 与历史版本行为保持一致。
-- =============================================================================
CREATE TABLE IF NOT EXISTS `sys_sn_home_layout`
(
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`serialno` VARCHAR(64) NOT NULL COMMENT '设备序列号(关联 sys_sn.serialno)',
-- ===================== 布局配置 =====================
`page_order` VARCHAR(128) NOT NULL DEFAULT 'settings,contact,home' COMMENT '首页分页顺序(逗号分隔:settings/contact/home,apps 恒在最后)',
`default_page` VARCHAR(32) NOT NULL DEFAULT 'home' COMMENT '默认展示页(home/contact/settings)',
-- ===================== 通用字段 =====================
`create_time` DATETIME DEFAULT NULL COMMENT '创建时间',
`update_time` DATETIME DEFAULT NULL COMMENT '更新时间',
`is_deleted` TINYINT DEFAULT 0 COMMENT '逻辑删除(0未删 1已删)',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_serialno` (`serialno`),
KEY `idx_is_deleted` (`is_deleted`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COMMENT = '设备首页分页布局表';