From aeeb860535c838103351ba7f72f509418bc5c6ef Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期一, 23 六月 2025 15:01:16 +0800
Subject: [PATCH] 2025-06-23 设备表DDL

---
 doc/add.sql |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/doc/add.sql b/doc/add.sql
new file mode 100644
index 0000000..359bc49
--- /dev/null
+++ b/doc/add.sql
@@ -0,0 +1,58 @@
+
+# 璁惧鍙拌处
+create table `product-inventory-management`.device_repair
+(
+    id                 bigint auto_increment
+        primary key,
+    device_ledger_id   varchar(255) not null comment '璁惧鍙拌处id',
+    repair_time        timestamp    null comment '鎶ヤ慨鏃ユ湡',
+    repair_name        varchar(255) not null comment '鎶ヤ慨浜�',
+    remark             varchar(255) not null comment '鏁呴殰鐜拌薄',
+    maintenance_name   varchar      not null comment '缁翠慨浜�',
+    maintenance_time   timestamp    null comment '缁翠慨鏃堕棿',
+    maintenance_result varchar(255) null comment '缁翠慨缁撴灉',
+    status             int default 0 comment '鐘舵��',
+    create_time        datetime     null comment '褰曞叆鏃堕棿',
+    update_time        datetime     null comment '鏇存柊鏃堕棿',
+    create_user        varchar(255) not null comment '褰曞叆浜�',
+    update_user        varchar(255) not null comment '鏇存柊浜�',
+    tenant_id          bigint       not null comment '绉熸埛id'
+);
+
+# 璁惧缁翠慨
+create table `product-inventory-management`.device_ledger
+(
+    id                           bigint auto_increment
+        primary key,
+    device_name                  varchar(255) not null comment '璁惧鍚嶇О',
+    device_model                 varchar(255) not null comment '瑙勬牸鍨嬪彿',
+    supplier_name                varchar(255) not null comment '渚涘簲鍟�',
+    unit                         varchar(255) not null comment '鍗曚綅',
+    number                       decimal      not null comment '鏁伴噺',
+    tax_including_price_unit     decimal      not null comment '鍚◣鍗曚环',
+    tax_including_price_total    decimal      not null comment '鍚◣鎬讳环',
+    tax_rate                     decimal      not null comment '绋庣巼',
+    un_tax_including_price_total decimal      not null comment '涓嶅惈绋庢�讳环',
+    create_time                  timestamp    null comment '褰曞叆鏃堕棿',
+    update_time                  timestamp    null comment '鏇存柊鏃堕棿',
+    create_user                  varchar(255) not null comment '褰曞叆浜�',
+    update_user                  varchar(255) not null comment '鏇存柊浜�',
+    tenant_id                    bigint       not null comment '绉熸埛id'
+);
+
+create table `product-inventory-management`.device_maintenance
+(
+    id                 bigint auto_increment
+        primary key,
+    device_ledger_id   varchar(255) not null comment '璁惧鍙拌处id',
+    maintenance__plan_time        timestamp    null comment '璁″垝淇濆吇鏃ユ湡',
+    maintenance_actually_name   varchar(255)      not null comment '瀹為檯淇濆吇浜�',
+    maintenance_actually_time   timestamp    null comment '瀹為檯淇濆吇鏃ユ湡',
+    maintenance_result int not null  default 0 comment '淇濆吇缁撴灉 0 缁翠慨 1 瀹屽ソ',
+    status             int not null  default 0 comment '鐘舵�� 0 寰呬繚鍏� 1 瀹岀粨',
+    create_time        datetime     null comment '褰曞叆鏃堕棿',
+    update_time        datetime     null comment '鏇存柊鏃堕棿',
+    create_user        varchar(255) not null comment '褰曞叆浜�',
+    update_user        varchar(255) not null comment '鏇存柊浜�',
+    tenant_id          bigint       not null comment '绉熸埛id'
+);
\ No newline at end of file

--
Gitblit v1.9.3