From c8f56e6b091e49a802320f2051ab1cec9d8f96ee Mon Sep 17 00:00:00 2001 From: maziyang Date: Fri, 20 Jun 2025 10:45:08 +0800 Subject: [PATCH] =?UTF-8?q?gf=E6=A1=86=E6=9E=B6=E6=90=AD=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/internal/vote_poll.go | 4 ++-- internal/model/do/vote_poll.go | 2 +- internal/model/entity/vote_poll.go | 2 +- manifest/config/config.yaml | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 manifest/config/config.yaml diff --git a/internal/dao/internal/vote_poll.go b/internal/dao/internal/vote_poll.go index 3f6b885..c7005a3 100644 --- a/internal/dao/internal/vote_poll.go +++ b/internal/dao/internal/vote_poll.go @@ -22,7 +22,7 @@ type VotePollDao struct { // VotePollColumns defines and stores column names for the table vote_poll. type VotePollColumns struct { Id string // - PostId string // 文章/视频ID + ArticleId string // 文章/视频ID VoteTitle string // 投票活动标题 MultiOption string // 是否开启多选:1多选,0不多选 DeadlineTime string // 截止时间 @@ -34,7 +34,7 @@ type VotePollColumns struct { // votePollColumns holds the columns for the table vote_poll. var votePollColumns = VotePollColumns{ Id: "id", - PostId: "post_id", + ArticleId: "article_id", VoteTitle: "vote_title", MultiOption: "multi_option", DeadlineTime: "deadline_time", diff --git a/internal/model/do/vote_poll.go b/internal/model/do/vote_poll.go index 82a9f6b..67ea16b 100644 --- a/internal/model/do/vote_poll.go +++ b/internal/model/do/vote_poll.go @@ -13,7 +13,7 @@ import ( type VotePoll struct { g.Meta `orm:"table:vote_poll, do:true"` Id interface{} // - PostId interface{} // 文章/视频ID + ArticleId interface{} // 文章/视频ID VoteTitle interface{} // 投票活动标题 MultiOption interface{} // 是否开启多选:1多选,0不多选 DeadlineTime *gtime.Time // 截止时间 diff --git a/internal/model/entity/vote_poll.go b/internal/model/entity/vote_poll.go index 450ceab..192d964 100644 --- a/internal/model/entity/vote_poll.go +++ b/internal/model/entity/vote_poll.go @@ -11,7 +11,7 @@ import ( // VotePoll is the golang structure for table vote_poll. type VotePoll struct { Id int64 `json:"id" orm:"id" description:""` // - PostId int64 `json:"postId" orm:"post_id" description:"文章/视频ID"` // 文章/视频ID + ArticleId int64 `json:"articleId" orm:"article_id" description:"文章/视频ID"` // 文章/视频ID VoteTitle string `json:"voteTitle" orm:"vote_title" description:"投票活动标题"` // 投票活动标题 MultiOption int `json:"multiOption" orm:"multi_option" description:"是否开启多选:1多选,0不多选"` // 是否开启多选:1多选,0不多选 DeadlineTime *gtime.Time `json:"deadlineTime" orm:"deadline_time" description:"截止时间"` // 截止时间 diff --git a/manifest/config/config.yaml b/manifest/config/config.yaml new file mode 100644 index 0000000..8b7dc92 --- /dev/null +++ b/manifest/config/config.yaml @@ -0,0 +1,15 @@ +# https://goframe.org/docs/web/server-config-file-template +server: + address: ":8000" + openapiPath: "/api.json" + swaggerPath: "/swagger" + +# https://goframe.org/docs/core/glog-config +logger: + level : "all" + stdout: true + +# https://goframe.org/docs/core/gdb-config-file +database: + default: + link: "mysql:root:123456@tcp(127.0.0.1:3306)/link_test" \ No newline at end of file