From 4cc89b24fcbe99797eb057296531ce13df192ab0 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Thu, 20 Jun 2024 17:16:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0zx=5Focr=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/entity/zx_ocr.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/photo_review/entity/zx_ocr.py b/photo_review/entity/zx_ocr.py index 1bb8deb..e66ed06 100644 --- a/photo_review/entity/zx_ocr.py +++ b/photo_review/entity/zx_ocr.py @@ -1,5 +1,5 @@ # coding: utf-8 -from sqlalchemy import Column, DateTime, String +from sqlalchemy import Column, DateTime, String, text from sqlalchemy.dialects.mysql import INTEGER from config.mysql import Base @@ -11,9 +11,12 @@ class ZxOcr(Base): pk_ocr = Column(INTEGER(11), primary_key=True, comment='图片OCR识别主键') pk_phhd = Column(INTEGER(11), nullable=False, comment='报销单主键') pk_phrec = Column(INTEGER(11), nullable=False, comment='图片主键') + id = Column(INTEGER(11), nullable=False, comment='识别批次') cfjaddress = Column(String(200), nullable=False, comment='云存储文件名') content = Column(String(5000), comment='OCR识别内容') - create_time = Column(DateTime, comment='创建时间') + x_offset = Column(INTEGER(11), comment='x轴偏移量') + y_offset = Column(INTEGER(11), comment='y轴偏移量') + create_time = Column(DateTime, server_default=text("CURRENT_TIMESTAMP"), comment='创建时间') creator = Column(String(30), comment='创建人') - update_time = Column(DateTime, comment='修改时间') + update_time = Column(DateTime, server_default=text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"), comment='修改时间') updater = Column(String(30), comment='修改人')