/*
Navicat PGSQL Data Transfer

Source Server         : 192.168.1.170
Source Server Version : 80122
Source Host           : 192.168.1.170:5432
Source Database       : csbl
Source Schema         : public

Target Server Type    : PGSQL
Target Server Version : 80122
File Encoding         : 65001

Date: 2011-01-06 16:36:59
*/


-- ----------------------------
-- Sequence structure for "m_hinshu_seq"
-- ----------------------------
DROP SEQUENCE "m_hinshu_seq";
CREATE SEQUENCE "m_hinshu_seq"
 INCREMENT 1
 MINVALUE 1
 MAXVALUE 99999
 START 56
 CACHE 1
 CYCLE;

-- ----------------------------
-- Table structure for "m_bunrui"
-- ----------------------------
DROP TABLE "m_bunrui";
CREATE TABLE "public"."m_bunrui" (
"bunrui_cd" numeric(5) DEFAULT NULL NOT NULL,
"bunrui_nm" varchar(30) DEFAULT NULL NOT NULL,
"bunrui_rnm" varchar(8) DEFAULT NULL NOT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
"status_kbn" numeric(1) DEFAULT NULL,
CONSTRAINT "m_bunrui_pkey" PRIMARY KEY ("bunrui_cd")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."m_bunrui" OWNER TO "karahana";;

-- ----------------------------
-- Table structure for "m_code"
-- ----------------------------
DROP TABLE "m_code";
CREATE TABLE "public"."m_code" (
"mokuji_cd" numeric(1) DEFAULT NULL NOT NULL,
"clm_cd" numeric(5) DEFAULT NULL NOT NULL,
"clm_nm" varchar(30) DEFAULT NULL NOT NULL,
"clm_rnm" varchar(8) DEFAULT NULL NOT NULL,
"status_kbn" numeric(1) DEFAULT NULL NOT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
CONSTRAINT "m_code_pkey" PRIMARY KEY ("mokuji_cd", "clm_cd")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."m_code" OWNER TO "karahana";;


-- ----------------------------
-- Table structure for "m_hinmoku"
-- ----------------------------
DROP TABLE "m_hinmoku";
CREATE TABLE "public"."m_hinmoku" (
"hinmoku_cd" numeric(5) DEFAULT NULL NOT NULL,
"hinmoku_nm" varchar(30) DEFAULT NULL NOT NULL,
"hinmoku_rnm" varchar(8) DEFAULT NULL NOT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
"bunrui_cd" numeric(5) DEFAULT NULL NOT NULL,
"status_kbn" numeric(1) DEFAULT NULL,
CONSTRAINT "m_hinmoku_pkey" PRIMARY KEY ("hinmoku_cd", "bunrui_cd")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."m_hinmoku" OWNER TO "karahana";;


-- ----------------------------
-- Table structure for "m_hinshu"
-- ----------------------------
DROP TABLE "m_hinshu";
CREATE TABLE "public"."m_hinshu" (
"hinshu_cd" numeric(5) DEFAULT nextval(('m_hinshu_seq'::text)::regclass) NOT NULL,
"hinshu_nm" varchar(30) DEFAULT NULL NOT NULL,
"hinshu_rnm" varchar(8) DEFAULT NULL NOT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
"bunrui_cd" numeric(5) DEFAULT NULL NOT NULL,
"hinmoku_cd" numeric(5) DEFAULT NULL NOT NULL,
"status_kbn" numeric(1) DEFAULT NULL NOT NULL,
"user_cd" numeric(5) DEFAULT NULL NOT NULL,
CONSTRAINT "m_hinshu_pkey" PRIMARY KEY ("hinshu_cd", "bunrui_cd", "hinmoku_cd")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."m_hinshu" OWNER TO "karahana";;


-- ----------------------------
-- Table structure for "m_kaiichi"
-- ----------------------------
DROP TABLE "m_kaiichi";
CREATE TABLE "public"."m_kaiichi" (
"seri_date" numeric(8) DEFAULT NULL NOT NULL,
"seri_time" numeric(4) DEFAULT NULL NOT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
CONSTRAINT "m_kaiichi_pkey" PRIMARY KEY ("seri_date")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."m_kaiichi" OWNER TO "karahana";;


-- ----------------------------
-- Table structure for "m_system"
-- ----------------------------
DROP TABLE "m_system";
CREATE TABLE "public"."m_system" (
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
"shuka_flg" numeric(1) DEFAULT NULL NOT NULL,
"yoyaku_flg" numeric(1) DEFAULT NULL NOT NULL,
"shuka_time" time DEFAULT NULL NOT NULL,
"yoyaku_time" time DEFAULT NULL NOT NULL,
"seri_start_time" time DEFAULT NULL NOT NULL
)
WITHOUT OIDS 
;

ALTER TABLE "public"."m_system" OWNER TO "karahana";;

-- ----------------------------
-- Records of m_system
-- ----------------------------
INSERT INTO "m_system" VALUES (null, null, '2010-12-21 19:11:18.844707', '10.0', '1', '1', '23:00:00', '23:30:00', '07:30:00');

-- ----------------------------
-- Table structure for "m_user"
-- ----------------------------
DROP TABLE "m_user";
CREATE TABLE "public"."m_user" (
"user_kbn" numeric(1) DEFAULT NULL NOT NULL,
"user_cd" numeric(5) DEFAULT NULL NOT NULL,
"passwd" varchar(256) DEFAULT NULL NOT NULL,
"status_kbn" numeric(1) DEFAULT NULL NOT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
"user_nm" varchar(30) DEFAULT NULL NOT NULL,
"user_rnm" varchar(10) DEFAULT NULL NOT NULL,
"pc_mail" varchar(256) DEFAULT NULL,
"mb_mail" varchar(256) DEFAULT NULL,
CONSTRAINT "m_user_pkey" PRIMARY KEY ("user_kbn", "user_cd")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."m_user" OWNER TO "karahana";;


-- ----------------------------
-- Table structure for "t_getsuji"
-- ----------------------------
DROP TABLE "t_getsuji";
CREATE TABLE "public"."t_getsuji" (
"user_kbn" numeric(1) DEFAULT NULL NOT NULL,
"user_cd" numeric(5) DEFAULT NULL NOT NULL,
"jiseki_ym" numeric(6) DEFAULT NULL NOT NULL,
"hinmoku_cd" numeric(5) DEFAULT NULL NOT NULL,
"honsu" numeric(10) DEFAULT NULL,
"kingaku" numeric(10) DEFAULT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
CONSTRAINT "t_getsuji_pkey" PRIMARY KEY ("user_kbn", "user_cd", "jiseki_ym", "hinmoku_cd")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."t_getsuji" OWNER TO "karahana";;

-- ----------------------------
-- Table structure for "t_msg"
-- ----------------------------
DROP TABLE "t_msg";
CREATE TABLE "public"."t_msg" (
"user_kbn" numeric(1) DEFAULT NULL NOT NULL,
"target_kbn" numeric(1) DEFAULT NULL NOT NULL,
"open_ymd" numeric(8) DEFAULT NULL NOT NULL,
"close_ymd" numeric(8) DEFAULT NULL,
"memo" varchar(5000) DEFAULT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
CONSTRAINT "t_msg_pkey" PRIMARY KEY ("user_kbn", "target_kbn", "open_ymd")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."t_msg" OWNER TO "karahana";;

-- ----------------------------
-- Records of t_msg
-- ----------------------------
INSERT INTO "t_msg" VALUES ('2', '1', '19000101', '19000102', null, '2011-01-06 10:49:25.92751', '0.0', null, null);
INSERT INTO "t_msg" VALUES ('2', '2', '19000101', '19000102', null, '2011-01-06 10:49:25.92751', '0.0', null, null);
INSERT INTO "t_msg" VALUES ('3', '1', '19000101', '19000102', null, '2011-01-06 10:49:25.92751', '0.0', null, null);
INSERT INTO "t_msg" VALUES ('3', '2', '19000101', '19000102', null, '2011-01-06 10:49:25.92751', '0.0', null, null);

-- ----------------------------
-- Table structure for "t_shuka"
-- ----------------------------
DROP TABLE "t_shuka";
CREATE TABLE "public"."t_shuka" (
"sm_date" numeric(8) DEFAULT NULL NOT NULL,
"sm_no" numeric(5) DEFAULT NULL NOT NULL,
"sm_kbn" numeric(1) DEFAULT NULL NOT NULL,
"bunrui_cd" numeric(5) DEFAULT NULL NOT NULL,
"hinmoku_cd" numeric(5) DEFAULT NULL NOT NULL,
"hinshu_cd" int8 DEFAULT NULL NOT NULL,
"user_cd" numeric(5) DEFAULT NULL NOT NULL,
"class_cd" numeric(5) DEFAULT NULL,
"iro_cd" numeric(5) DEFAULT NULL,
"rinsu_cnt" numeric(5) DEFAULT NULL,
"iri_cnt" numeric(4) DEFAULT NULL,
"sou_cnt" numeric(5) DEFAULT NULL,
"tanka" numeric(7) DEFAULT NULL,
"memo" varchar(3000) DEFAULT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
CONSTRAINT "t_shuka_pkey" PRIMARY KEY ("sm_date", "sm_no")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."t_shuka" OWNER TO "karahana";;


-- ----------------------------
-- Table structure for "t_yoyaku"
-- ----------------------------
DROP TABLE "t_yoyaku";
CREATE TABLE "public"."t_yoyaku" (
"sm_date" numeric(8) DEFAULT NULL NOT NULL,
"sm_no" numeric(5) DEFAULT NULL NOT NULL,
"rsv_no" numeric(3) DEFAULT NULL NOT NULL,
"seisan_cd" numeric(5) DEFAULT NULL NOT NULL,
"hanasho_cd" numeric(5) DEFAULT NULL NOT NULL,
"rsv_cnt" numeric(5) DEFAULT NULL NOT NULL,
"add_ymd" timestamp DEFAULT NULL,
"add_usr" numeric(5,1) DEFAULT NULL,
"upd_ymd" timestamp DEFAULT NULL,
"upd_usr" numeric(5,1) DEFAULT NULL,
CONSTRAINT "t_yoyaku_pkey" PRIMARY KEY ("sm_date", "sm_no", "rsv_no", "seisan_cd", "hanasho_cd")
)
WITHOUT OIDS 
;

ALTER TABLE "public"."t_yoyaku" OWNER TO "karahana";;

