From 7b270ca8c8904a4b9810c23654f8dd3fe78a7e5b Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Mon, 24 Jun 2024 12:36:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A1=A8zx=5Fie=5Fsettlement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/entity/zx_ie_settlement.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/photo_review/entity/zx_ie_settlement.py b/photo_review/entity/zx_ie_settlement.py index c0d2c9a..7cc429b 100644 --- a/photo_review/entity/zx_ie_settlement.py +++ b/photo_review/entity/zx_ie_settlement.py @@ -1,5 +1,5 @@ # coding: utf-8 -from sqlalchemy import Column, DECIMAL, Date, DateTime, String +from sqlalchemy import Column, DECIMAL, Date, DateTime, String, text from sqlalchemy.dialects.mysql import INTEGER from config.mysql import Base @@ -24,7 +24,7 @@ class ZxIeSettlement(Base): personal_funded_amount_str = Column(String(255), comment='自费金额字符串') personal_funded_amount = Column(DECIMAL(18, 2), comment='自费金额') medical_insurance_type = Column(String(255), comment='医保类型') - create_time = Column(DateTime, comment='创建时间') + create_time = Column(DateTime, server_default=text("CURRENT_TIMESTAMP"), comment='创建时间') creator = Column(String(255), comment='创建人') - update_time = Column(DateTime, comment='修改时间') + update_time = Column(DateTime, server_default=text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"), comment='修改时间') updater = Column(String(255), comment='修改人')