From f57fa5ae83b8dc87f9446d3f25b796a847d460cb Mon Sep 17 00:00:00 2001 From: dengbiao Date: Wed, 21 Aug 2024 18:55:12 +0800 Subject: [PATCH] update --- cmd_db.bat | 2 +- src/dao/applet_application_ad_space_list_dao.go | 5 +++++ .../applet_application_ad_space_list_implement.go | 14 ++++++++++++++ src/model/applet_application_ad_space_list.go | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/dao/applet_application_ad_space_list_dao.go create mode 100644 src/implement/applet_application_ad_space_list_implement.go create mode 100644 src/model/applet_application_ad_space_list.go diff --git a/cmd_db.bat b/cmd_db.bat index a17a00a..041af6d 100644 --- a/cmd_db.bat +++ b/cmd_db.bat @@ -12,7 +12,7 @@ if "%one%" NEQ "" ( set BasePath="./" set DBUSER="root" set DBPSW="Fnuo123com@" -set DBNAME="super_advertisement" +set DBNAME="advertisement" set DBHOST="119.23.182.117" set DBPORT="3306" diff --git a/src/dao/applet_application_ad_space_list_dao.go b/src/dao/applet_application_ad_space_list_dao.go new file mode 100644 index 0000000..8fcb97d --- /dev/null +++ b/src/dao/applet_application_ad_space_list_dao.go @@ -0,0 +1,5 @@ +package dao + +type AppletApplicationAdSpaceListDao interface { + //TODO:: You can add specific method definitions here +} diff --git a/src/implement/applet_application_ad_space_list_implement.go b/src/implement/applet_application_ad_space_list_implement.go new file mode 100644 index 0000000..b0a1cc8 --- /dev/null +++ b/src/implement/applet_application_ad_space_list_implement.go @@ -0,0 +1,14 @@ +package implement + +import ( + "applet/app/db/dao" + "xorm.io/xorm" +) + +func NewAppletApplicationAdSpaceListDb(engine *xorm.Engine) dao.AppletApplicationAdSpaceListDao { + return &AppletApplicationAdSpaceListDb{Db: engine} +} + +type AppletApplicationAdSpaceListDb struct { + Db *xorm.Engine +} diff --git a/src/model/applet_application_ad_space_list.go b/src/model/applet_application_ad_space_list.go new file mode 100644 index 0000000..4b2a6ab --- /dev/null +++ b/src/model/applet_application_ad_space_list.go @@ -0,0 +1,15 @@ +package model + +import ( + "time" +) + +type AppletApplicationAdSpaceList struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Name string `json:"name" xorm:"default '' comment('广告位名称') VARCHAR(255)"` + AppId string `json:"app_id" xorm:"not null default '' comment('小程序appid') VARCHAR(255)"` + Kind int `json:"kind" xorm:"not null default 1 comment('广告位类型(1:开屏广告 2:插屏广告 3:激励视频 4:信息流 5:Banner)') TINYINT(1)"` + State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝 3:封禁中)') TINYINT(1)"` + CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` + Update time.Time `json:"update" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` +}