-- zoo 테이블 생성
CREATE TABLE tb_zoo
(
  uid           BIGSERIAL PRIMARY KEY,
  uuid          UUID         NOT NULL UNIQUE,
  name          VARCHAR(200) NOT NULL,
  location      VARCHAR(300),
  description   TEXT,
  is_deleted    BOOLEAN      NOT NULL DEFAULT FALSE,
  created_date  TIMESTAMPTZ  NOT NULL,
  modified_date TIMESTAMPTZ  NOT NULL
);

-- 인덱스 생성
CREATE INDEX idx_zoo_uuid ON tb_zoo (uuid);
CREATE INDEX idx_zoo_name ON tb_zoo (name);
CREATE INDEX idx_zoo_is_deleted ON tb_zoo (is_deleted);

-- 주석 추가
COMMENT ON TABLE tb_zoo IS '동물원 정보';
COMMENT ON COLUMN tb_zoo.uid IS '고유 식별자 (PK)';
COMMENT ON COLUMN tb_zoo.uuid IS 'UUID (Unique)';
COMMENT ON COLUMN tb_zoo.name IS '동물원 이름';
COMMENT ON COLUMN tb_zoo.location IS '위치';
COMMENT ON COLUMN tb_zoo.description IS '설명';
COMMENT ON COLUMN tb_zoo.is_deleted IS '삭제 여부';
COMMENT ON COLUMN tb_zoo.created_date IS '생성일시';
COMMENT ON COLUMN tb_zoo.modified_date IS '수정일시';
