Files
fad_oa/sql/oa_city.sql
2026-04-20 14:14:08 +08:00

25 lines
1.2 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.

-- 城市管理表 oa_city
DROP TABLE IF EXISTS oa_city;
CREATE TABLE oa_city (
city_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '城市主键ID',
country_name VARCHAR(64) NOT NULL COMMENT '国家',
city_name VARCHAR(64) NOT NULL COMMENT '城市',
status BIGINT DEFAULT 1 COMMENT '状态 1正常 0禁用',
remark VARCHAR(500) DEFAULT NULL COMMENT '备注',
del_flag TINYINT DEFAULT 0 COMMENT '删除标志0=正常1=已删除',
create_by VARCHAR(64) DEFAULT '' COMMENT '创建者',
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
update_by VARCHAR(64) DEFAULT '' COMMENT '更新者',
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (city_id),
KEY idx_country_name (country_name),
KEY idx_city_name (city_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='城市管理表';
INSERT INTO oa_city (country_name, city_name, status, remark) VALUES
('中国', '北京', 1, '默认城市'),
('中国', '上海', 1, '默认城市'),
('中国', '广州', 1, '默认城市'),
('中国', '深圳', 1, '默认城市'),
('中国', '杭州', 1, '默认城市');