-- tn_basemap definition

-- Drop table

-- DROP TABLE tn_basemap;

CREATE TABLE tn_basemap (
	id varchar(20) NOT NULL, -- 배경지도 ID
	title varchar(50) NULL, -- 배경지도 제목
	source_url varchar(1000) NULL, -- 배경지도 URL
	thumbnail_url varchar(1000) NULL, -- 배경지도 썸네일 URL
	use_at bpchar(1) NULL, -- 배경지도 사용여부
	frst_regist_pnttm timestamp NULL, -- 등록일시
	frst_register_id varchar(20) NULL, -- 등록자
	last_updt_pnttm timestamp NULL, -- 수정일시
	last_updusr_id varchar(20) NULL, -- 수정자
	CONSTRAINT basemap_pkey PRIMARY KEY (id)
);
COMMENT ON TABLE tn_basemap IS '3. 2D GIS 관리 > 배경지도 관리';

-- Column comments

COMMENT ON COLUMN tn_basemap.id IS '배경지도 ID';
COMMENT ON COLUMN tn_basemap.title IS '배경지도 제목';
COMMENT ON COLUMN tn_basemap.source_url IS '배경지도 URL';
COMMENT ON COLUMN tn_basemap.thumbnail_url IS '배경지도 썸네일 URL';
COMMENT ON COLUMN tn_basemap.use_at IS '배경지도 사용여부';
COMMENT ON COLUMN tn_basemap.frst_regist_pnttm IS '등록일시';
COMMENT ON COLUMN tn_basemap.frst_register_id IS '등록자';
COMMENT ON COLUMN tn_basemap.last_updt_pnttm IS '수정일시';
COMMENT ON COLUMN tn_basemap.last_updusr_id IS '수정자';

INSERT INTO tn_basemap (id,title,source_url,thumbnail_url,use_at,frst_regist_pnttm,frst_register_id,last_updt_pnttm,last_updusr_id) VALUES
	 ('vworld:Base','일반','https://cdn.vworld.kr/2d/Base/service/{z}/{x}/{y}.png','https://cdn.vworld.kr/2d/Base/service/12/3489/1587.png','Y','2025-07-23 13:49:03.103639','admin','2025-07-23 13:49:03.103639','admin'),
	 ('vworld:white','백지도','https://cdn.vworld.kr/2d/white/service/{z}/{x}/{y}.png','https://cdn.vworld.kr/2d/white/service/12/3489/1587.png','Y','2025-07-23 13:49:04.167735','admin','2025-07-23 13:49:04.167735','admin'),
	 ('vworld:midnight','야간','https://cdn.vworld.kr/2d/midnight/service/{z}/{x}/{y}.png','https://cdn.vworld.kr/2d/midnight/service/12/3489/1587.png','Y','2025-07-23 13:49:05.226245','admin','2025-07-23 13:49:05.226245','admin'),
	 ('vworld:Hybrid','하이브리드','https://cdn.vworld.kr/2d/Hybrid/service/{z}/{x}/{y}.png
https://cdn.vworld.kr/2d/Satellite/service/{z}/{x}/{y}.jpeg','https://cdn.vworld.kr/2d/Hybrid/service/12/3489/1587.png
https://cdn.vworld.kr/2d/Satellite/service/12/3489/1587.jpeg','Y','2025-07-23 13:49:06.147349','admin','2025-07-23 13:49:06.147349','admin'),
	 ('vworld:Satellite','영상','https://cdn.vworld.kr/2d/Satellite/service/{z}/{x}/{y}.jpeg','https://cdn.vworld.kr/2d/Satellite/service/12/3489/1587.jpeg','Y','2025-07-23 13:49:08.50219','admin','2025-07-23 13:49:08.50219','admin');
