采购订单 DB脚本设计

采购订单 DB脚本设计
pull/4/head
siontion 8 months ago
parent 0330250028
commit bf6d5a37d7

@ -239,3 +239,31 @@ CREATE TABLE `pro_process_bom_detail` (
PRIMARY KEY (`id`) USING BTREE, PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_bom`(`bom_id`) USING BTREE INDEX `idx_bom`(`bom_id`) USING BTREE
) ENGINE=InnoDB COMMENT='工艺bom明细表'; ) ENGINE=InnoDB COMMENT='工艺bom明细表';
DROP TABLE IF EXISTS `project_purchase_order`;
CREATE TABLE `project_purchase_order` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增字段,唯一',
`purchase_no` varchar(16) NOT NULL COMMENT '采购单号',
`supplier_id` bigint(20) DEFAULT NULL COMMENT '供应商id',
`contract_no` varchar(255) DEFAULT NULL COMMENT '采购合同号',
`purchase_type` tinyint(1) DEFAULT NULL COMMENT '采购单类型1按物料需求计划采购2备库采购',
`project_material_plan_id` bigint(20) DEFAULT NULL COMMENT '供应商id',
`goods_type` tinyint(1) NOT NULL COMMENT '采购物类型1物料2加工件',
`currency_type` tinyint(4) DEFAULT NULL COMMENT '结算币种',
`tax_ratio` int(11) DEFAULT NULL COMMENT '税率',
`estimated_price` decimal(10,2) DEFAULT NULL COMMENT '暂估价金额',
`actual_price` decimal(10,2) DEFAULT NULL COMMENT '实际价金额',
`status` tinyint(1) DEFAULT '1' COMMENT '状态,1已保存2已送审3已审核4已打回 默认是1',
`submit_user_id` bigint(20) DEFAULT NULL COMMENT '送审人',
`submit_time` datetime DEFAULT NULL COMMENT '送审时间',
`auditor` bigint(20) DEFAULT NULL COMMENT '审核人',
`audit_time` datetime DEFAULT NULL COMMENT '审核时间',
`description` varchar(255) DEFAULT NULL COMMENT '备注',
`creator` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT='采购订单';

Loading…
Cancel
Save