-- public.tmp_encounter_auto_roll definition
-- Drop table
-- DROP TABLE public.tmp_encounter_auto_roll;
CREATE TABLE PUBLIC.tmp_encounter_auto_roll (
  ID bigserial NOT NULL,
  status_enum INT4 DEFAULT 2 NOT NULL,
  encounter_id INT8 NOT NULL,
  instance_table VARCHAR ( 255 ) DEFAULT '' :: CHARACTER VARYING NOT NULL,
  instance_id INT8 NOT NULL,
  quantity NUMERIC ( 20, 6 ) DEFAULT 0 NOT NULL,
  tenant_id INT8 NOT NULL,
  delete_flag INT4 DEFAULT 0 NOT NULL,
  create_by VARCHAR ( 32 ) DEFAULT '' :: CHARACTER VARYING NOT NULL,
  create_time TIMESTAMPTZ ( 6 ) NOT NULL,
  update_by VARCHAR ( 32 ) NULL,
  update_time TIMESTAMPTZ ( 6 ) NULL,
  CONSTRAINT tmp_encounter_auto_roll_pkey PRIMARY KEY ( ID ) 
);
COMMENT ON TABLE PUBLIC.tmp_encounter_auto_roll IS '住院就诊滚方绑定';
-- Column comments
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.ID IS 'ID';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.status_enum IS '状态';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.encounter_id IS '就诊id';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.instance_table IS '实例表名';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.instance_id IS '实例id';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.quantity IS '数量';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.tenant_id IS '租户ID';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.delete_flag IS '删除状态';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.create_by IS '创建人';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.create_time IS '创建时间';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.update_by IS '更新人';
COMMENT ON COLUMN PUBLIC.tmp_encounter_auto_roll.update_time IS '更新时间';
   -- Insert migration record
INSERT INTO __MigrationsHistory (MigrationId, ProductVersion)
VALUES ('202511171215 add_table tmp_encounter_auto_roll', '1.0.0');