From 1e180d22fdb13399e9caf31da97a1b5554123102 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期四, 26 九月 2024 21:09:27 +0800
Subject: [PATCH] fix db

---
 db/base.go |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/db/base.go b/db/base.go
index ed77248..83214e2 100644
--- a/db/base.go
+++ b/db/base.go
@@ -1,12 +1,15 @@
 package db
 
+import (
+	"gorm.io/gorm"
+	"time"
+)
+
 type BaseEntity struct {
-	Id         string `gorm:"primary_key;column:id" json:"id" example:""`
-	CreateTime string `gorm:"column:createTime" json:"createTime,omitempty" example:""`
-	UpdateTime string `gorm:"column:updateTime" json:"updateTime,omitempty" example:""`
-	CreateBy   string `gorm:"column:createBy" json:"createBy,omitempty" example:""`
-	IsDelete   int    `gorm:"column:isDelete" json:"isDelete" example:"0 鏈垹闄� 1宸插垹闄�"`
-	Enable     int    `gorm:"column:enable" json:"enable" example:" 1鐢熸晥 0鏈敓鏁�"`
+	ID        string `gorm:"primary_key;column:id;type:varchar(255);" json:"id"`
+	CreatedAt time.Time
+	UpdatedAt time.Time
+	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
 }
 
 type FeatureCacheBase struct {
@@ -14,5 +17,4 @@
 	AreaId      string
 	TableId     string
 	FaceFeature []float32
-	Enable      int32
 }

--
Gitblit v1.8.0