 -- 创建序列
	CREATE SEQUENCE tmp_orders_group_package_id_seq
		START WITH 1
		INCREMENT BY 1
		NO MINVALUE
		NO MAXVALUE
		CACHE 1;


CREATE TABLE "tmp_orders_group_package" (
  "id" int8 NOT NULL DEFAULT nextval('tmp_orders_group_package_id_seq'::regclass),
  "name" varchar(255) COLLATE "pg_catalog"."default" DEFAULT ''::character varying,
  "package_type_enum" int4 NOT NULL,
  "organization_id" int8 DEFAULT NULL,
  "practitioner_id" int8 DEFAULT NULL,
  "tenant_id" int8 NOT NULL,
  "delete_flag" char(1) COLLATE "pg_catalog"."default" NOT NULL DEFAULT 0,
  "create_by" varchar(32) COLLATE "pg_catalog"."default" NOT NULL DEFAULT ''::character varying,
  "create_time" timestamptz(6) NOT NULL,
  "update_by" varchar(32) COLLATE "pg_catalog"."default",
  "update_time" timestamptz(6),
  CONSTRAINT "tmp_orders_group_package_pkey" PRIMARY KEY ("id")
)
;

ALTER TABLE "tmp_orders_group_package" 
  OWNER TO "postgres";

COMMENT ON COLUMN "tmp_orders_group_package"."id" IS 'ID';

COMMENT ON COLUMN "tmp_orders_group_package"."name" IS '名称';

COMMENT ON COLUMN "tmp_orders_group_package"."package_type_enum" IS '组套包类型';

COMMENT ON COLUMN "tmp_orders_group_package"."organization_id" IS '科室id';

COMMENT ON COLUMN "tmp_orders_group_package"."practitioner_id" IS '参与者id';

COMMENT ON COLUMN "tmp_orders_group_package"."tenant_id" IS '租户ID';

COMMENT ON COLUMN "tmp_orders_group_package"."delete_flag" IS '删除状态';

COMMENT ON COLUMN "tmp_orders_group_package"."create_by" IS '创建人';

COMMENT ON COLUMN "tmp_orders_group_package"."create_time" IS '创建时间';

COMMENT ON COLUMN "tmp_orders_group_package"."update_by" IS '更新人';

COMMENT ON COLUMN "tmp_orders_group_package"."update_time" IS '更新时间';

COMMENT ON TABLE "tmp_orders_group_package" IS '医嘱组合套餐';	

-- 插入添加临时订单分组包表的迁移记录
INSERT INTO __MigrationsHistory (MigrationId, ProductVersion)
VALUES ('202509081020add_table_tmp_orders_group_package', '1.0.0');
