当前位置:   article > 正文

企业开发实战-erp -仓库表设计-postgresql

企业开发实战-erp -仓库表设计-postgresql
CREATE TABLE "public"."store_house" (
  "id" int4 NOT NULL,
  "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "address" varchar(100) COLLATE "pg_catalog"."default",
  "price" numeric(10,2),
  "sort" int2,
  "remark" varchar(255) COLLATE "pg_catalog"."default",
  "tenant_id" int4,
  "default_flag" bool,
  CONSTRAINT "store_house_pkey" PRIMARY KEY ("id")
)
;

ALTER TABLE "public"."store_house" 
  OWNER TO "postgres";

COMMENT ON COLUMN "public"."store_house"."name" IS '仓库名称';

COMMENT ON COLUMN "public"."store_house"."address" IS '仓库地址';

COMMENT ON COLUMN "public"."store_house"."price" IS '仓库费用';

COMMENT ON COLUMN "public"."store_house"."sort" IS '排序';

COMMENT ON COLUMN "public"."store_house"."remark" IS '备注';

COMMENT ON COLUMN "public"."store_house"."tenant_id" IS '租户id';

COMMENT ON COLUMN "public"."store_house"."default_flag" IS '是否默认';

COMMENT ON TABLE "public"."store_house" IS '仓库表';
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

补充类行
仓库类型:描述仓库的类型,例如普通仓库、冷藏仓库、危险品仓库等。

ALTER TABLE "public"."store_house" 
  ADD COLUMN "type" char(2);

COMMENT ON COLUMN "public"."store_house"."type" IS 'P 普通仓库、C 冷藏仓库、W 危险品仓库';
  • 1
  • 2
  • 3
  • 4

补充大小

仓库容量:记录仓库的总容量,可以是货物数量、面积或体积等度量单位。

仓库负责人:记录负责该仓库管理和运营的人员信息,包括姓名、联系方式等。

最新sql

CREATE TABLE "public"."store_house" (
  "id" int4 NOT NULL,
  "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "address" varchar(100) COLLATE "pg_catalog"."default",
  "price" numeric(10,2),
  "sort" int2,
  "remark" varchar(255) COLLATE "pg_catalog"."default",
  "tenant_id" int4,
  "default_flag" bool,
  "type" char(2) COLLATE "pg_catalog"."default",
  "responsible" varchar(20) COLLATE "pg_catalog"."default",
  "responsible_mobile" varchar(20) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "deleted" bool,
  CONSTRAINT "store_house_pkey" PRIMARY KEY ("id")
)
;

ALTER TABLE "public"."store_house" 
  OWNER TO "postgres";

COMMENT ON COLUMN "public"."store_house"."name" IS '仓库名称';

COMMENT ON COLUMN "public"."store_house"."address" IS '仓库地址';

COMMENT ON COLUMN "public"."store_house"."price" IS '仓库费用';

COMMENT ON COLUMN "public"."store_house"."sort" IS '排序';

COMMENT ON COLUMN "public"."store_house"."remark" IS '备注';

COMMENT ON COLUMN "public"."store_house"."tenant_id" IS '租户id';

COMMENT ON COLUMN "public"."store_house"."default_flag" IS '是否默认';

COMMENT ON COLUMN "public"."store_house"."type" IS 'P 普通仓库、C 冷藏仓库、W 危险品仓库';

COMMENT ON COLUMN "public"."store_house"."responsible" IS '负责人';

COMMENT ON COLUMN "public"."store_house"."responsible_mobile" IS '负责人联系方式';

COMMENT ON COLUMN "public"."store_house"."create_by" IS '创建者';

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

COMMENT ON COLUMN "public"."store_house"."update_by" IS '更新者';

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

COMMENT ON TABLE "public"."store_house" IS '仓库表';
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53

新增启用状态:

CREATE TABLE "public"."store_house" (
  "id" int4 NOT NULL,
  "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "address" varchar(100) COLLATE "pg_catalog"."default",
  "price" numeric(10,2),
  "sort" int2,
  "remark" varchar(255) COLLATE "pg_catalog"."default",
  "tenant_id" int4,
  "default_flag" bool,
  "type" char(2) COLLATE "pg_catalog"."default",
  "responsible" varchar(20) COLLATE "pg_catalog"."default",
  "responsible_mobile" varchar(20) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "deleted" bool,
  "enabled" char(2) COLLATE "pg_catalog"."default",
  CONSTRAINT "store_house_pkey" PRIMARY KEY ("id")
)
;

ALTER TABLE "public"."store_house" 
  OWNER TO "postgres";

COMMENT ON COLUMN "public"."store_house"."name" IS '仓库名称';

COMMENT ON COLUMN "public"."store_house"."address" IS '仓库地址';

COMMENT ON COLUMN "public"."store_house"."price" IS '仓库费用';

COMMENT ON COLUMN "public"."store_house"."sort" IS '排序';

COMMENT ON COLUMN "public"."store_house"."remark" IS '备注';

COMMENT ON COLUMN "public"."store_house"."tenant_id" IS '租户id';

COMMENT ON COLUMN "public"."store_house"."default_flag" IS '是否默认';

COMMENT ON COLUMN "public"."store_house"."type" IS 'P 普通仓库、C 冷藏仓库、W 危险品仓库';

COMMENT ON COLUMN "public"."store_house"."responsible" IS '负责人';

COMMENT ON COLUMN "public"."store_house"."responsible_mobile" IS '负责人联系方式';

COMMENT ON COLUMN "public"."store_house"."create_by" IS '创建者';

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

COMMENT ON COLUMN "public"."store_house"."update_by" IS '更新者';

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

COMMENT ON COLUMN "public"."store_house"."enabled" IS '启用:E,禁用D';

COMMENT ON TABLE "public"."store_house" IS '仓库表';
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/71792
推荐阅读
相关标签
  

闽ICP备14008679号