diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1fbf887 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* linguist-language=GO \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..18646b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +.buildpath +.hgignore.swp +.project +.orig +.swp +.idea/ +.settings/ +.vscode/ +bin/ +**/.DS_Store +gf +main +main.exe +output/ +manifest/output/ +temp/ +temp.yaml +bin +**/config/config.yaml \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2a6e6e9 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +ROOT_DIR = $(shell pwd) +NAMESPACE = "default" +DEPLOY_NAME = "template-single" +DOCKER_NAME = "template-single" + +include ./hack/hack-cli.mk +include ./hack/hack.mk \ No newline at end of file diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..d36cedd --- /dev/null +++ b/README.MD @@ -0,0 +1,4 @@ +# GoFrame Template For SingleRepo + +Quick Start: +- https://goframe.org/quick \ No newline at end of file diff --git a/api/hello/hello.go b/api/hello/hello.go new file mode 100644 index 0000000..3163f3b --- /dev/null +++ b/api/hello/hello.go @@ -0,0 +1,15 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package hello + +import ( + "context" + + "VoteManage_Go/api/hello/v1" +) + +type IHelloV1 interface { + Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error) +} diff --git a/api/hello/v1/hello.go b/api/hello/v1/hello.go new file mode 100644 index 0000000..b4dd233 --- /dev/null +++ b/api/hello/v1/hello.go @@ -0,0 +1,12 @@ +package v1 + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +type HelloReq struct { + g.Meta `path:"/hello" tags:"Hello" method:"get" summary:"You first hello api"` +} +type HelloRes struct { + g.Meta `mime:"text/html" example:"string"` +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..0deeee0 --- /dev/null +++ b/go.mod @@ -0,0 +1,28 @@ +module VoteManage_Go + +go 1.18 + +require github.com/gogf/gf/v2 v2.7.1 + +require ( + github.com/BurntSushi/toml v1.3.2 // indirect + github.com/clbanning/mxj/v2 v2.7.0 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/gorilla/websocket v1.5.1 // indirect + github.com/grokify/html-strip-tags-go v0.1.0 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect + go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/otel/sdk v1.14.0 // indirect + go.opentelemetry.io/otel/trace v1.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..c1d3bdc --- /dev/null +++ b/go.sum @@ -0,0 +1,52 @@ +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyME= +github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/gogf/gf/v2 v2.7.1 h1:Ukp7vzwh6VKnivEEx/xiMc61dL1HVZqCCHl//3GBRxc= +github.com/gogf/gf/v2 v2.7.1/go.mod h1:3oyGjyLHtSSo8kQ57Nj1TPdUNc0e2HS0A2J+KkXoW+I= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/grokify/html-strip-tags-go v0.1.0 h1:03UrQLjAny8xci+R+qjCce/MYnpNXCtgzltlQbOBae4= +github.com/grokify/html-strip-tags-go v0.1.0/go.mod h1:ZdzgfHEzAfz9X6Xe5eBLVblWIxXfYSQ40S/VKrAOGpc= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= +go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hack/config.yaml b/hack/config.yaml new file mode 100644 index 0000000..abaf120 --- /dev/null +++ b/hack/config.yaml @@ -0,0 +1,13 @@ + +# CLI tool, only in development environment. +# https://goframe.org/docs/cli +gfcli: + gen: + dao: + - link: "mysql:shequ:7bMDPChJSdLMAwNR@tcp(121.89.234.155:3306)/shequ" + descriptionTag: true + + docker: + build: "-a amd64 -s linux -p temp -ew" + tagPrefixes: + - my.image.pub/my-app \ No newline at end of file diff --git a/hack/hack-cli.mk b/hack/hack-cli.mk new file mode 100644 index 0000000..f4e2ad2 --- /dev/null +++ b/hack/hack-cli.mk @@ -0,0 +1,20 @@ + +# Install/Update to the latest CLI tool. +.PHONY: cli +cli: + @set -e; \ + wget -O gf \ + https://github.com/gogf/gf/releases/latest/download/gf_$(shell go env GOOS)_$(shell go env GOARCH) && \ + chmod +x gf && \ + ./gf install -y && \ + rm ./gf + + +# Check and install CLI tool. +.PHONY: cli.install +cli.install: + @set -e; \ + gf -v > /dev/null 2>&1 || if [[ "$?" -ne "0" ]]; then \ + echo "GoFame CLI is not installed, start proceeding auto installation..."; \ + make cli; \ + fi; \ No newline at end of file diff --git a/hack/hack.mk b/hack/hack.mk new file mode 100644 index 0000000..2f68179 --- /dev/null +++ b/hack/hack.mk @@ -0,0 +1,75 @@ +.DEFAULT_GOAL := build + +# Update GoFrame and its CLI to latest stable version. +.PHONY: up +up: cli.install + @gf up -a + +# Build binary using configuration from hack/config.yaml. +.PHONY: build +build: cli.install + @gf build -ew + +# Parse api and generate controller/sdk. +.PHONY: ctrl +ctrl: cli.install + @gf gen ctrl + +# Generate Go files for DAO/DO/Entity. +.PHONY: dao +dao: cli.install + @gf gen dao + +# Parse current project go files and generate enums go file. +.PHONY: enums +enums: cli.install + @gf gen enums + +# Generate Go files for Service. +.PHONY: service +service: cli.install + @gf gen service + + +# Build docker image. +.PHONY: image +image: cli.install + $(eval _TAG = $(shell git rev-parse --short HEAD)) +ifneq (, $(shell git status --porcelain 2>/dev/null)) + $(eval _TAG = $(_TAG).dirty) +endif + $(eval _TAG = $(if ${TAG}, ${TAG}, $(_TAG))) + $(eval _PUSH = $(if ${PUSH}, ${PUSH}, )) + @gf docker ${_PUSH} -tn $(DOCKER_NAME):${_TAG}; + + +# Build docker image and automatically push to docker repo. +.PHONY: image.push +image.push: cli.install + @make image PUSH=-p; + + +# Deploy image and yaml to current kubectl environment. +.PHONY: deploy +deploy: cli.install + $(eval _TAG = $(if ${TAG}, ${TAG}, develop)) + + @set -e; \ + mkdir -p $(ROOT_DIR)/temp/kustomize;\ + cd $(ROOT_DIR)/manifest/deploy/kustomize/overlays/${_ENV};\ + kustomize build > $(ROOT_DIR)/temp/kustomize.yaml;\ + kubectl apply -f $(ROOT_DIR)/temp/kustomize.yaml; \ + if [ $(DEPLOY_NAME) != "" ]; then \ + kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}"; \ + fi; + + +# Parsing protobuf files and generating go files. +.PHONY: pb +pb: cli.install + @gf gen pb + +# Generate protobuf files for database tables. +.PHONY: pbentity +pbentity: cli.install + @gf gen pbentity \ No newline at end of file diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go new file mode 100644 index 0000000..6f883cc --- /dev/null +++ b/internal/cmd/cmd.go @@ -0,0 +1,30 @@ +package cmd + +import ( + "context" + + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gcmd" + + "VoteManage_Go/internal/controller/hello" +) + +var ( + Main = gcmd.Command{ + Name: "main", + Usage: "main", + Brief: "start http server", + Func: func(ctx context.Context, parser *gcmd.Parser) (err error) { + s := g.Server() + s.Group("/", func(group *ghttp.RouterGroup) { + group.Middleware(ghttp.MiddlewareHandlerResponse) + group.Bind( + hello.NewV1(), + ) + }) + s.Run() + return nil + }, + } +) diff --git a/internal/consts/consts.go b/internal/consts/consts.go new file mode 100644 index 0000000..d709a2b --- /dev/null +++ b/internal/consts/consts.go @@ -0,0 +1 @@ +package consts diff --git a/internal/controller/hello/hello.go b/internal/controller/hello/hello.go new file mode 100644 index 0000000..f72082f --- /dev/null +++ b/internal/controller/hello/hello.go @@ -0,0 +1,5 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package hello diff --git a/internal/controller/hello/hello_new.go b/internal/controller/hello/hello_new.go new file mode 100644 index 0000000..94d2945 --- /dev/null +++ b/internal/controller/hello/hello_new.go @@ -0,0 +1,15 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package hello + +import ( + "VoteManage_Go/api/hello" +) + +type ControllerV1 struct{} + +func NewV1() hello.IHelloV1 { + return &ControllerV1{} +} diff --git a/internal/controller/hello/hello_v1_hello.go b/internal/controller/hello/hello_v1_hello.go new file mode 100644 index 0000000..704489c --- /dev/null +++ b/internal/controller/hello/hello_v1_hello.go @@ -0,0 +1,13 @@ +package hello + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + + "VoteManage_Go/api/hello/v1" +) + +func (c *ControllerV1) Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error) { + g.RequestFromCtx(ctx).Response.Writeln("Hello World!") + return +} diff --git a/internal/dao/.gitkeep b/internal/dao/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/internal/dao/able_sign_users.go b/internal/dao/able_sign_users.go new file mode 100644 index 0000000..b6b0334 --- /dev/null +++ b/internal/dao/able_sign_users.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalAbleSignUsersDao is internal type for wrapping internal DAO implements. +type internalAbleSignUsersDao = *internal.AbleSignUsersDao + +// ableSignUsersDao is the data access object for table able_sign_users. +// You can define custom methods on it to extend its functionality as you wish. +type ableSignUsersDao struct { + internalAbleSignUsersDao +} + +var ( + // AbleSignUsers is globally public accessible object for table able_sign_users operations. + AbleSignUsers = ableSignUsersDao{ + internal.NewAbleSignUsersDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/comment.go b/internal/dao/comment.go new file mode 100644 index 0000000..6788ef2 --- /dev/null +++ b/internal/dao/comment.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalCommentDao is internal type for wrapping internal DAO implements. +type internalCommentDao = *internal.CommentDao + +// commentDao is the data access object for table comment. +// You can define custom methods on it to extend its functionality as you wish. +type commentDao struct { + internalCommentDao +} + +var ( + // Comment is globally public accessible object for table comment operations. + Comment = commentDao{ + internal.NewCommentDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/comment_zan.go b/internal/dao/comment_zan.go new file mode 100644 index 0000000..b1abea5 --- /dev/null +++ b/internal/dao/comment_zan.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalCommentZanDao is internal type for wrapping internal DAO implements. +type internalCommentZanDao = *internal.CommentZanDao + +// commentZanDao is the data access object for table comment_zan. +// You can define custom methods on it to extend its functionality as you wish. +type commentZanDao struct { + internalCommentZanDao +} + +var ( + // CommentZan is globally public accessible object for table comment_zan operations. + CommentZan = commentZanDao{ + internal.NewCommentZanDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/experience_officer_sign.go b/internal/dao/experience_officer_sign.go new file mode 100644 index 0000000..0ed5bed --- /dev/null +++ b/internal/dao/experience_officer_sign.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalExperienceOfficerSignDao is internal type for wrapping internal DAO implements. +type internalExperienceOfficerSignDao = *internal.ExperienceOfficerSignDao + +// experienceOfficerSignDao is the data access object for table experience_officer_sign. +// You can define custom methods on it to extend its functionality as you wish. +type experienceOfficerSignDao struct { + internalExperienceOfficerSignDao +} + +var ( + // ExperienceOfficerSign is globally public accessible object for table experience_officer_sign operations. + ExperienceOfficerSign = experienceOfficerSignDao{ + internal.NewExperienceOfficerSignDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/experience_officer_vote.go b/internal/dao/experience_officer_vote.go new file mode 100644 index 0000000..5fc1748 --- /dev/null +++ b/internal/dao/experience_officer_vote.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalExperienceOfficerVoteDao is internal type for wrapping internal DAO implements. +type internalExperienceOfficerVoteDao = *internal.ExperienceOfficerVoteDao + +// experienceOfficerVoteDao is the data access object for table experience_officer_vote. +// You can define custom methods on it to extend its functionality as you wish. +type experienceOfficerVoteDao struct { + internalExperienceOfficerVoteDao +} + +var ( + // ExperienceOfficerVote is globally public accessible object for table experience_officer_vote operations. + ExperienceOfficerVote = experienceOfficerVoteDao{ + internal.NewExperienceOfficerVoteDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/hot_jwcode.go b/internal/dao/hot_jwcode.go new file mode 100644 index 0000000..6b1e5f3 --- /dev/null +++ b/internal/dao/hot_jwcode.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalHotJwcodeDao is internal type for wrapping internal DAO implements. +type internalHotJwcodeDao = *internal.HotJwcodeDao + +// hotJwcodeDao is the data access object for table hot_jwcode. +// You can define custom methods on it to extend its functionality as you wish. +type hotJwcodeDao struct { + internalHotJwcodeDao +} + +var ( + // HotJwcode is globally public accessible object for table hot_jwcode operations. + HotJwcode = hotJwcodeDao{ + internal.NewHotJwcodeDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/hot_subject.go b/internal/dao/hot_subject.go new file mode 100644 index 0000000..981c353 --- /dev/null +++ b/internal/dao/hot_subject.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalHotSubjectDao is internal type for wrapping internal DAO implements. +type internalHotSubjectDao = *internal.HotSubjectDao + +// hotSubjectDao is the data access object for table hot_subject. +// You can define custom methods on it to extend its functionality as you wish. +type hotSubjectDao struct { + internalHotSubjectDao +} + +var ( + // HotSubject is globally public accessible object for table hot_subject operations. + HotSubject = hotSubjectDao{ + internal.NewHotSubjectDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/hot_wish.go b/internal/dao/hot_wish.go new file mode 100644 index 0000000..4f50282 --- /dev/null +++ b/internal/dao/hot_wish.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalHotWishDao is internal type for wrapping internal DAO implements. +type internalHotWishDao = *internal.HotWishDao + +// hotWishDao is the data access object for table hot_wish. +// You can define custom methods on it to extend its functionality as you wish. +type hotWishDao struct { + internalHotWishDao +} + +var ( + // HotWish is globally public accessible object for table hot_wish operations. + HotWish = hotWishDao{ + internal.NewHotWishDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/internal/able_sign_users.go b/internal/dao/internal/able_sign_users.go new file mode 100644 index 0000000..5c439f7 --- /dev/null +++ b/internal/dao/internal/able_sign_users.go @@ -0,0 +1,77 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// AbleSignUsersDao is the data access object for table able_sign_users. +type AbleSignUsersDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns AbleSignUsersColumns // columns contains all the column names of Table for convenient usage. +} + +// AbleSignUsersColumns defines and stores column names for table able_sign_users. +type AbleSignUsersColumns struct { + Id string // + Jwcode string // + Type string // 1 博股会员 2 信息费5年 3 购买三个指标 +} + +// ableSignUsersColumns holds the columns for table able_sign_users. +var ableSignUsersColumns = AbleSignUsersColumns{ + Id: "id", + Jwcode: "jwcode", + Type: "type", +} + +// NewAbleSignUsersDao creates and returns a new DAO object for table data access. +func NewAbleSignUsersDao() *AbleSignUsersDao { + return &AbleSignUsersDao{ + group: "default", + table: "able_sign_users", + columns: ableSignUsersColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *AbleSignUsersDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *AbleSignUsersDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *AbleSignUsersDao) Columns() AbleSignUsersColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *AbleSignUsersDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *AbleSignUsersDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *AbleSignUsersDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/comment.go b/internal/dao/internal/comment.go new file mode 100644 index 0000000..5d18fd9 --- /dev/null +++ b/internal/dao/internal/comment.go @@ -0,0 +1,89 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// CommentDao is the data access object for table comment. +type CommentDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns CommentColumns // columns contains all the column names of Table for convenient usage. +} + +// CommentColumns defines and stores column names for table comment. +type CommentColumns struct { + Id string // + WishId string // 心愿ID + Jwcode string // 评论人code + Content string // 评论内容 + Image string // 图片,多张图片用json格式保存 + ReplyNum string // 回复数 + Pid string // 父级评论ID + Delete string // 0正常1删除 + CreatedAt string // 评论时间 +} + +// commentColumns holds the columns for table comment. +var commentColumns = CommentColumns{ + Id: "id", + WishId: "wish_id", + Jwcode: "jwcode", + Content: "content", + Image: "image", + ReplyNum: "reply_num", + Pid: "pid", + Delete: "delete", + CreatedAt: "created_at", +} + +// NewCommentDao creates and returns a new DAO object for table data access. +func NewCommentDao() *CommentDao { + return &CommentDao{ + group: "default", + table: "comment", + columns: commentColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *CommentDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *CommentDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *CommentDao) Columns() CommentColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *CommentDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *CommentDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *CommentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/comment_zan.go b/internal/dao/internal/comment_zan.go new file mode 100644 index 0000000..47c6f7c --- /dev/null +++ b/internal/dao/internal/comment_zan.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// CommentZanDao is the data access object for table comment_zan. +type CommentZanDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns CommentZanColumns // columns contains all the column names of Table for convenient usage. +} + +// CommentZanColumns defines and stores column names for table comment_zan. +type CommentZanColumns struct { + Id string // + Jwcode string // + CommentId string // + CreatedAt string // +} + +// commentZanColumns holds the columns for table comment_zan. +var commentZanColumns = CommentZanColumns{ + Id: "id", + Jwcode: "jwcode", + CommentId: "comment_id", + CreatedAt: "created_at", +} + +// NewCommentZanDao creates and returns a new DAO object for table data access. +func NewCommentZanDao() *CommentZanDao { + return &CommentZanDao{ + group: "default", + table: "comment_zan", + columns: commentZanColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *CommentZanDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *CommentZanDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *CommentZanDao) Columns() CommentZanColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *CommentZanDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *CommentZanDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *CommentZanDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/experience_officer_sign.go b/internal/dao/internal/experience_officer_sign.go new file mode 100644 index 0000000..902227f --- /dev/null +++ b/internal/dao/internal/experience_officer_sign.go @@ -0,0 +1,89 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// ExperienceOfficerSignDao is the data access object for table experience_officer_sign. +type ExperienceOfficerSignDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns ExperienceOfficerSignColumns // columns contains all the column names of Table for convenient usage. +} + +// ExperienceOfficerSignColumns defines and stores column names for table experience_officer_sign. +type ExperienceOfficerSignColumns struct { + Id string // + Jwcode string // + Time string // + State string // 1 报名用户 + Location string // 1 新加坡 2 马来 3 香港 4 美股 5 A股 + Identity string // 1 博股会员 2 金卡会员 + ReservationCode string // + Seat string // + Date string // +} + +// experienceOfficerSignColumns holds the columns for table experience_officer_sign. +var experienceOfficerSignColumns = ExperienceOfficerSignColumns{ + Id: "id", + Jwcode: "jwcode", + Time: "time", + State: "state", + Location: "location", + Identity: "identity", + ReservationCode: "reservation_code", + Seat: "seat", + Date: "date", +} + +// NewExperienceOfficerSignDao creates and returns a new DAO object for table data access. +func NewExperienceOfficerSignDao() *ExperienceOfficerSignDao { + return &ExperienceOfficerSignDao{ + group: "default", + table: "experience_officer_sign", + columns: experienceOfficerSignColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *ExperienceOfficerSignDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *ExperienceOfficerSignDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *ExperienceOfficerSignDao) Columns() ExperienceOfficerSignColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *ExperienceOfficerSignDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *ExperienceOfficerSignDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *ExperienceOfficerSignDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/experience_officer_vote.go b/internal/dao/internal/experience_officer_vote.go new file mode 100644 index 0000000..aac0894 --- /dev/null +++ b/internal/dao/internal/experience_officer_vote.go @@ -0,0 +1,89 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// ExperienceOfficerVoteDao is the data access object for table experience_officer_vote. +type ExperienceOfficerVoteDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns ExperienceOfficerVoteColumns // columns contains all the column names of Table for convenient usage. +} + +// ExperienceOfficerVoteColumns defines and stores column names for table experience_officer_vote. +type ExperienceOfficerVoteColumns struct { + Id string // + Jwcode string // + Time string // + State string // 1 报名用户 + Location string // 1 新加坡 2 马来 3 香港 4 美股 5 A股 + Identity string // 1 博股会员 2 金卡会员 + ReservationCode string // + Seat string // + Date string // +} + +// experienceOfficerVoteColumns holds the columns for table experience_officer_vote. +var experienceOfficerVoteColumns = ExperienceOfficerVoteColumns{ + Id: "id", + Jwcode: "jwcode", + Time: "time", + State: "state", + Location: "location", + Identity: "identity", + ReservationCode: "reservation_code", + Seat: "seat", + Date: "date", +} + +// NewExperienceOfficerVoteDao creates and returns a new DAO object for table data access. +func NewExperienceOfficerVoteDao() *ExperienceOfficerVoteDao { + return &ExperienceOfficerVoteDao{ + group: "default", + table: "experience_officer_vote", + columns: experienceOfficerVoteColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *ExperienceOfficerVoteDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *ExperienceOfficerVoteDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *ExperienceOfficerVoteDao) Columns() ExperienceOfficerVoteColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *ExperienceOfficerVoteDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *ExperienceOfficerVoteDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *ExperienceOfficerVoteDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/hot_jwcode.go b/internal/dao/internal/hot_jwcode.go new file mode 100644 index 0000000..2d73cc2 --- /dev/null +++ b/internal/dao/internal/hot_jwcode.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// HotJwcodeDao is the data access object for table hot_jwcode. +type HotJwcodeDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns HotJwcodeColumns // columns contains all the column names of Table for convenient usage. +} + +// HotJwcodeColumns defines and stores column names for table hot_jwcode. +type HotJwcodeColumns struct { + Id string // + Jwcode string // 精网号 + Hot string // 热度值 + UpdatedAt string // +} + +// hotJwcodeColumns holds the columns for table hot_jwcode. +var hotJwcodeColumns = HotJwcodeColumns{ + Id: "id", + Jwcode: "jwcode", + Hot: "hot", + UpdatedAt: "updated_at", +} + +// NewHotJwcodeDao creates and returns a new DAO object for table data access. +func NewHotJwcodeDao() *HotJwcodeDao { + return &HotJwcodeDao{ + group: "default", + table: "hot_jwcode", + columns: hotJwcodeColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *HotJwcodeDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *HotJwcodeDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *HotJwcodeDao) Columns() HotJwcodeColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *HotJwcodeDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *HotJwcodeDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *HotJwcodeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/hot_subject.go b/internal/dao/internal/hot_subject.go new file mode 100644 index 0000000..1bb81a9 --- /dev/null +++ b/internal/dao/internal/hot_subject.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// HotSubjectDao is the data access object for table hot_subject. +type HotSubjectDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns HotSubjectColumns // columns contains all the column names of Table for convenient usage. +} + +// HotSubjectColumns defines and stores column names for table hot_subject. +type HotSubjectColumns struct { + Id string // + SubjectId string // 话题ID + Hot string // 热度值 + UpdatedAt string // +} + +// hotSubjectColumns holds the columns for table hot_subject. +var hotSubjectColumns = HotSubjectColumns{ + Id: "id", + SubjectId: "subject_id", + Hot: "hot", + UpdatedAt: "updated_at", +} + +// NewHotSubjectDao creates and returns a new DAO object for table data access. +func NewHotSubjectDao() *HotSubjectDao { + return &HotSubjectDao{ + group: "default", + table: "hot_subject", + columns: hotSubjectColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *HotSubjectDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *HotSubjectDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *HotSubjectDao) Columns() HotSubjectColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *HotSubjectDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *HotSubjectDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *HotSubjectDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/hot_wish.go b/internal/dao/internal/hot_wish.go new file mode 100644 index 0000000..6caeade --- /dev/null +++ b/internal/dao/internal/hot_wish.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// HotWishDao is the data access object for table hot_wish. +type HotWishDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns HotWishColumns // columns contains all the column names of Table for convenient usage. +} + +// HotWishColumns defines and stores column names for table hot_wish. +type HotWishColumns struct { + Id string // + WishId string // 心愿ID + Hot string // 热度值 + UpdatedAt string // +} + +// hotWishColumns holds the columns for table hot_wish. +var hotWishColumns = HotWishColumns{ + Id: "id", + WishId: "wish_id", + Hot: "hot", + UpdatedAt: "updated_at", +} + +// NewHotWishDao creates and returns a new DAO object for table data access. +func NewHotWishDao() *HotWishDao { + return &HotWishDao{ + group: "default", + table: "hot_wish", + columns: hotWishColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *HotWishDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *HotWishDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *HotWishDao) Columns() HotWishColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *HotWishDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *HotWishDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *HotWishDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/lecturers.go b/internal/dao/internal/lecturers.go new file mode 100644 index 0000000..f9f2753 --- /dev/null +++ b/internal/dao/internal/lecturers.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// LecturersDao is the data access object for table lecturers. +type LecturersDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns LecturersColumns // columns contains all the column names of Table for convenient usage. +} + +// LecturersColumns defines and stores column names for table lecturers. +type LecturersColumns struct { + Id string // + Jwcode string // + Avatar string // + Name string // +} + +// lecturersColumns holds the columns for table lecturers. +var lecturersColumns = LecturersColumns{ + Id: "id", + Jwcode: "jwcode", + Avatar: "avatar", + Name: "name", +} + +// NewLecturersDao creates and returns a new DAO object for table data access. +func NewLecturersDao() *LecturersDao { + return &LecturersDao{ + group: "default", + table: "lecturers", + columns: lecturersColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *LecturersDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *LecturersDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *LecturersDao) Columns() LecturersColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *LecturersDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *LecturersDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *LecturersDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/manager.go b/internal/dao/internal/manager.go new file mode 100644 index 0000000..51808e6 --- /dev/null +++ b/internal/dao/internal/manager.go @@ -0,0 +1,85 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// ManagerDao is the data access object for table manager. +type ManagerDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns ManagerColumns // columns contains all the column names of Table for convenient usage. +} + +// ManagerColumns defines and stores column names for table manager. +type ManagerColumns struct { + Id string // + Jwcode string // + Name string // + Type string // 产品ID + LanguageKey string // + Enabled string // + CreatedAt string // +} + +// managerColumns holds the columns for table manager. +var managerColumns = ManagerColumns{ + Id: "id", + Jwcode: "jwcode", + Name: "name", + Type: "type", + LanguageKey: "language_key", + Enabled: "enabled", + CreatedAt: "created_at", +} + +// NewManagerDao creates and returns a new DAO object for table data access. +func NewManagerDao() *ManagerDao { + return &ManagerDao{ + group: "default", + table: "manager", + columns: managerColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *ManagerDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *ManagerDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *ManagerDao) Columns() ManagerColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *ManagerDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *ManagerDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *ManagerDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/member_info.go b/internal/dao/internal/member_info.go new file mode 100644 index 0000000..17d0d1a --- /dev/null +++ b/internal/dao/internal/member_info.go @@ -0,0 +1,89 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// MemberInfoDao is the data access object for table member_info. +type MemberInfoDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns MemberInfoColumns // columns contains all the column names of Table for convenient usage. +} + +// MemberInfoColumns defines and stores column names for table member_info. +type MemberInfoColumns struct { + Id string // + Jwcode string // + Nickname string // + Img string // + Medal string // 体验官勋章url + LocMarket string // + Dept string // + Shop string // + BoguMember string // 1:博股会员,0:不是 +} + +// memberInfoColumns holds the columns for table member_info. +var memberInfoColumns = MemberInfoColumns{ + Id: "id", + Jwcode: "jwcode", + Nickname: "nickname", + Img: "img", + Medal: "medal", + LocMarket: "loc_market", + Dept: "dept", + Shop: "shop", + BoguMember: "bogu_member", +} + +// NewMemberInfoDao creates and returns a new DAO object for table data access. +func NewMemberInfoDao() *MemberInfoDao { + return &MemberInfoDao{ + group: "default", + table: "member_info", + columns: memberInfoColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *MemberInfoDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *MemberInfoDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *MemberInfoDao) Columns() MemberInfoColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *MemberInfoDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *MemberInfoDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *MemberInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/notice.go b/internal/dao/internal/notice.go new file mode 100644 index 0000000..e800354 --- /dev/null +++ b/internal/dao/internal/notice.go @@ -0,0 +1,89 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// NoticeDao is the data access object for table notice. +type NoticeDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns NoticeColumns // columns contains all the column names of Table for convenient usage. +} + +// NoticeColumns defines and stores column names for table notice. +type NoticeColumns struct { + Id string // + Type string // 1进度修改2评论3点赞 + WishId string // 心愿ID + CommentId string // + Jwcode string // 操作人 + NoticeJwcode string // 通知人 + State string // 0新通知1已看 + WishState string // 把心愿改成的状态 + CreatedAt string // +} + +// noticeColumns holds the columns for table notice. +var noticeColumns = NoticeColumns{ + Id: "id", + Type: "type", + WishId: "wish_id", + CommentId: "comment_id", + Jwcode: "jwcode", + NoticeJwcode: "notice_jwcode", + State: "state", + WishState: "wish_state", + CreatedAt: "created_at", +} + +// NewNoticeDao creates and returns a new DAO object for table data access. +func NewNoticeDao() *NoticeDao { + return &NoticeDao{ + group: "default", + table: "notice", + columns: noticeColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *NoticeDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *NoticeDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *NoticeDao) Columns() NoticeColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *NoticeDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *NoticeDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *NoticeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/product.go b/internal/dao/internal/product.go new file mode 100644 index 0000000..dcb90b9 --- /dev/null +++ b/internal/dao/internal/product.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// ProductDao is the data access object for table product. +type ProductDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns ProductColumns // columns contains all the column names of Table for convenient usage. +} + +// ProductColumns defines and stores column names for table product. +type ProductColumns struct { + Id string // + Name string // + Enabled string // + ZhCN string // +} + +// productColumns holds the columns for table product. +var productColumns = ProductColumns{ + Id: "id", + Name: "name", + Enabled: "enabled", + ZhCN: "zh_CN", +} + +// NewProductDao creates and returns a new DAO object for table data access. +func NewProductDao() *ProductDao { + return &ProductDao{ + group: "default", + table: "product", + columns: productColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *ProductDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *ProductDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *ProductDao) Columns() ProductColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *ProductDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *ProductDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *ProductDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/subject.go b/internal/dao/internal/subject.go new file mode 100644 index 0000000..8c94b2b --- /dev/null +++ b/internal/dao/internal/subject.go @@ -0,0 +1,77 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// SubjectDao is the data access object for table subject. +type SubjectDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns SubjectColumns // columns contains all the column names of Table for convenient usage. +} + +// SubjectColumns defines and stores column names for table subject. +type SubjectColumns struct { + Id string // + Type string // + Content string // +} + +// subjectColumns holds the columns for table subject. +var subjectColumns = SubjectColumns{ + Id: "id", + Type: "type", + Content: "content", +} + +// NewSubjectDao creates and returns a new DAO object for table data access. +func NewSubjectDao() *SubjectDao { + return &SubjectDao{ + group: "default", + table: "subject", + columns: subjectColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *SubjectDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *SubjectDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *SubjectDao) Columns() SubjectColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *SubjectDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *SubjectDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *SubjectDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/support.go b/internal/dao/internal/support.go new file mode 100644 index 0000000..0bbb791 --- /dev/null +++ b/internal/dao/internal/support.go @@ -0,0 +1,81 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// SupportDao is the data access object for table support. +type SupportDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns SupportColumns // columns contains all the column names of Table for convenient usage. +} + +// SupportColumns defines and stores column names for table support. +type SupportColumns struct { + Id string // + Jwcode string // 用户标识 + WishId string // 心愿ID + Type string // 1支持2反对 + CreatedAt string // 时间 +} + +// supportColumns holds the columns for table support. +var supportColumns = SupportColumns{ + Id: "id", + Jwcode: "jwcode", + WishId: "wish_id", + Type: "type", + CreatedAt: "created_at", +} + +// NewSupportDao creates and returns a new DAO object for table data access. +func NewSupportDao() *SupportDao { + return &SupportDao{ + group: "default", + table: "support", + columns: supportColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *SupportDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *SupportDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *SupportDao) Columns() SupportColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *SupportDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *SupportDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *SupportDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/transaction_lecturer_records.go b/internal/dao/internal/transaction_lecturer_records.go new file mode 100644 index 0000000..0ddb9d1 --- /dev/null +++ b/internal/dao/internal/transaction_lecturer_records.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// TransactionLecturerRecordsDao is the data access object for table transaction_lecturer_records. +type TransactionLecturerRecordsDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns TransactionLecturerRecordsColumns // columns contains all the column names of Table for convenient usage. +} + +// TransactionLecturerRecordsColumns defines and stores column names for table transaction_lecturer_records. +type TransactionLecturerRecordsColumns struct { + Id string // + Jwcode string // + LecturerJwcode string // + Time string // +} + +// transactionLecturerRecordsColumns holds the columns for table transaction_lecturer_records. +var transactionLecturerRecordsColumns = TransactionLecturerRecordsColumns{ + Id: "id", + Jwcode: "jwcode", + LecturerJwcode: "lecturer_jwcode", + Time: "time", +} + +// NewTransactionLecturerRecordsDao creates and returns a new DAO object for table data access. +func NewTransactionLecturerRecordsDao() *TransactionLecturerRecordsDao { + return &TransactionLecturerRecordsDao{ + group: "default", + table: "transaction_lecturer_records", + columns: transactionLecturerRecordsColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *TransactionLecturerRecordsDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *TransactionLecturerRecordsDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *TransactionLecturerRecordsDao) Columns() TransactionLecturerRecordsColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *TransactionLecturerRecordsDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *TransactionLecturerRecordsDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *TransactionLecturerRecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/transaction_plan_files.go b/internal/dao/internal/transaction_plan_files.go new file mode 100644 index 0000000..4e163b9 --- /dev/null +++ b/internal/dao/internal/transaction_plan_files.go @@ -0,0 +1,81 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// TransactionPlanFilesDao is the data access object for table transaction_plan_files. +type TransactionPlanFilesDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns TransactionPlanFilesColumns // columns contains all the column names of Table for convenient usage. +} + +// TransactionPlanFilesColumns defines and stores column names for table transaction_plan_files. +type TransactionPlanFilesColumns struct { + Id string // + Jwcode string // + Content string // + Time string // 提交时间 + EncryptionId string // +} + +// transactionPlanFilesColumns holds the columns for table transaction_plan_files. +var transactionPlanFilesColumns = TransactionPlanFilesColumns{ + Id: "id", + Jwcode: "jwcode", + Content: "content", + Time: "time", + EncryptionId: "encryption_id", +} + +// NewTransactionPlanFilesDao creates and returns a new DAO object for table data access. +func NewTransactionPlanFilesDao() *TransactionPlanFilesDao { + return &TransactionPlanFilesDao{ + group: "default", + table: "transaction_plan_files", + columns: transactionPlanFilesColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *TransactionPlanFilesDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *TransactionPlanFilesDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *TransactionPlanFilesDao) Columns() TransactionPlanFilesColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *TransactionPlanFilesDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *TransactionPlanFilesDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *TransactionPlanFilesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/vote_1_indicators.go b/internal/dao/internal/vote_1_indicators.go new file mode 100644 index 0000000..2c5c880 --- /dev/null +++ b/internal/dao/internal/vote_1_indicators.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// Vote1IndicatorsDao is the data access object for table vote1_indicators. +type Vote1IndicatorsDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns Vote1IndicatorsColumns // columns contains all the column names of Table for convenient usage. +} + +// Vote1IndicatorsColumns defines and stores column names for table vote1_indicators. +type Vote1IndicatorsColumns struct { + Id string // + Title string // + Description string // + Img string // +} + +// vote1IndicatorsColumns holds the columns for table vote1_indicators. +var vote1IndicatorsColumns = Vote1IndicatorsColumns{ + Id: "id", + Title: "title", + Description: "description", + Img: "img", +} + +// NewVote1IndicatorsDao creates and returns a new DAO object for table data access. +func NewVote1IndicatorsDao() *Vote1IndicatorsDao { + return &Vote1IndicatorsDao{ + group: "default", + table: "vote1_indicators", + columns: vote1IndicatorsColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *Vote1IndicatorsDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *Vote1IndicatorsDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *Vote1IndicatorsDao) Columns() Vote1IndicatorsColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *Vote1IndicatorsDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *Vote1IndicatorsDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *Vote1IndicatorsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/vote_1_records.go b/internal/dao/internal/vote_1_records.go new file mode 100644 index 0000000..f69df60 --- /dev/null +++ b/internal/dao/internal/vote_1_records.go @@ -0,0 +1,81 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// Vote1RecordsDao is the data access object for table vote1_records. +type Vote1RecordsDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns Vote1RecordsColumns // columns contains all the column names of Table for convenient usage. +} + +// Vote1RecordsColumns defines and stores column names for table vote1_records. +type Vote1RecordsColumns struct { + Id string // + Jwcode string // + VId string // + VoteDate string // + Time string // +} + +// vote1RecordsColumns holds the columns for table vote1_records. +var vote1RecordsColumns = Vote1RecordsColumns{ + Id: "id", + Jwcode: "jwcode", + VId: "v_id", + VoteDate: "vote_date", + Time: "time", +} + +// NewVote1RecordsDao creates and returns a new DAO object for table data access. +func NewVote1RecordsDao() *Vote1RecordsDao { + return &Vote1RecordsDao{ + group: "default", + table: "vote1_records", + columns: vote1RecordsColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *Vote1RecordsDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *Vote1RecordsDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *Vote1RecordsDao) Columns() Vote1RecordsColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *Vote1RecordsDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *Vote1RecordsDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *Vote1RecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/vote_1_virtual_records.go b/internal/dao/internal/vote_1_virtual_records.go new file mode 100644 index 0000000..e0d47dd --- /dev/null +++ b/internal/dao/internal/vote_1_virtual_records.go @@ -0,0 +1,81 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// Vote1VirtualRecordsDao is the data access object for table vote1_virtual_records. +type Vote1VirtualRecordsDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns Vote1VirtualRecordsColumns // columns contains all the column names of Table for convenient usage. +} + +// Vote1VirtualRecordsColumns defines and stores column names for table vote1_virtual_records. +type Vote1VirtualRecordsColumns struct { + Id string // + VId string // + Votes string // + VoteDate string // + Time string // +} + +// vote1VirtualRecordsColumns holds the columns for table vote1_virtual_records. +var vote1VirtualRecordsColumns = Vote1VirtualRecordsColumns{ + Id: "id", + VId: "v_id", + Votes: "votes", + VoteDate: "vote_date", + Time: "time", +} + +// NewVote1VirtualRecordsDao creates and returns a new DAO object for table data access. +func NewVote1VirtualRecordsDao() *Vote1VirtualRecordsDao { + return &Vote1VirtualRecordsDao{ + group: "default", + table: "vote1_virtual_records", + columns: vote1VirtualRecordsColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *Vote1VirtualRecordsDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *Vote1VirtualRecordsDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *Vote1VirtualRecordsDao) Columns() Vote1VirtualRecordsColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *Vote1VirtualRecordsDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *Vote1VirtualRecordsDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *Vote1VirtualRecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/vote_indicators.go b/internal/dao/internal/vote_indicators.go new file mode 100644 index 0000000..ba42ecd --- /dev/null +++ b/internal/dao/internal/vote_indicators.go @@ -0,0 +1,77 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// VoteIndicatorsDao is the data access object for table vote_indicators. +type VoteIndicatorsDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns VoteIndicatorsColumns // columns contains all the column names of Table for convenient usage. +} + +// VoteIndicatorsColumns defines and stores column names for table vote_indicators. +type VoteIndicatorsColumns struct { + Id string // + Title string // + Num string // 选择人数 +} + +// voteIndicatorsColumns holds the columns for table vote_indicators. +var voteIndicatorsColumns = VoteIndicatorsColumns{ + Id: "id", + Title: "title", + Num: "num", +} + +// NewVoteIndicatorsDao creates and returns a new DAO object for table data access. +func NewVoteIndicatorsDao() *VoteIndicatorsDao { + return &VoteIndicatorsDao{ + group: "default", + table: "vote_indicators", + columns: voteIndicatorsColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *VoteIndicatorsDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *VoteIndicatorsDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *VoteIndicatorsDao) Columns() VoteIndicatorsColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *VoteIndicatorsDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *VoteIndicatorsDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *VoteIndicatorsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/vote_records.go b/internal/dao/internal/vote_records.go new file mode 100644 index 0000000..19ff48e --- /dev/null +++ b/internal/dao/internal/vote_records.go @@ -0,0 +1,81 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// VoteRecordsDao is the data access object for table vote_records. +type VoteRecordsDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns VoteRecordsColumns // columns contains all the column names of Table for convenient usage. +} + +// VoteRecordsColumns defines and stores column names for table vote_records. +type VoteRecordsColumns struct { + Id string // + Jwcode string // + VoteDate string // + Time string // + OptionsTitle string // +} + +// voteRecordsColumns holds the columns for table vote_records. +var voteRecordsColumns = VoteRecordsColumns{ + Id: "id", + Jwcode: "jwcode", + VoteDate: "vote_date", + Time: "time", + OptionsTitle: "options_title", +} + +// NewVoteRecordsDao creates and returns a new DAO object for table data access. +func NewVoteRecordsDao() *VoteRecordsDao { + return &VoteRecordsDao{ + group: "default", + table: "vote_records", + columns: voteRecordsColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *VoteRecordsDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *VoteRecordsDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *VoteRecordsDao) Columns() VoteRecordsColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *VoteRecordsDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *VoteRecordsDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *VoteRecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/wish.go b/internal/dao/internal/wish.go new file mode 100644 index 0000000..ea322b1 --- /dev/null +++ b/internal/dao/internal/wish.go @@ -0,0 +1,123 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// WishDao is the data access object for table wish. +type WishDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns WishColumns // columns contains all the column names of Table for convenient usage. +} + +// WishColumns defines and stores column names for table wish. +type WishColumns struct { + Id string // + Jwcode string // 用户标识 + Title string // 心愿名称 + Content string // 心愿内容 + Image string // 图片,多张图片用json格式保存 + Type string // 1精网2弘历软件3大财神4锦囊5L-2产品 + Status string // 0隐藏1待处理2排期中3在开发4已上线 + Support string // 点赞数 + Opposition string // 反对数 + Comment string // 评论数 + Fee string // 打赏当午券数 + FeeNum string // 打赏人数 + Vote string // 总票数 + Zan string // 点赞数 + See string // 观看数 + Class string // 1心愿2公告 + Label string // 1软件bug2产品需求3市场建议 + Delete string // 0正常1删除2隐藏 + ManagerJwcode string // 负责人的jwcode + Order string // 排序 + Coding string // 是否经过开发 + DeadLine string // 上线日期 + Language string // + SubjectId string // 话题ID + CreatedAt string // + UpdatedAt string // +} + +// wishColumns holds the columns for table wish. +var wishColumns = WishColumns{ + Id: "id", + Jwcode: "jwcode", + Title: "title", + Content: "content", + Image: "image", + Type: "type", + Status: "status", + Support: "support", + Opposition: "opposition", + Comment: "comment", + Fee: "fee", + FeeNum: "fee_num", + Vote: "vote", + Zan: "zan", + See: "see", + Class: "class", + Label: "label", + Delete: "delete", + ManagerJwcode: "manager_jwcode", + Order: "order", + Coding: "coding", + DeadLine: "dead_line", + Language: "language", + SubjectId: "subject_id", + CreatedAt: "created_at", + UpdatedAt: "updated_at", +} + +// NewWishDao creates and returns a new DAO object for table data access. +func NewWishDao() *WishDao { + return &WishDao{ + group: "default", + table: "wish", + columns: wishColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *WishDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *WishDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *WishDao) Columns() WishColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *WishDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *WishDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *WishDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/wish_cost.go b/internal/dao/internal/wish_cost.go new file mode 100644 index 0000000..139dcfa --- /dev/null +++ b/internal/dao/internal/wish_cost.go @@ -0,0 +1,85 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// WishCostDao is the data access object for table wish_cost. +type WishCostDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns WishCostColumns // columns contains all the column names of Table for convenient usage. +} + +// WishCostColumns defines and stores column names for table wish_cost. +type WishCostColumns struct { + Id string // + Jwcode string // + WishId string // + Coin string // + Status string // 1新建2成功3未成功 + Msg string // + CreatedAt string // +} + +// wishCostColumns holds the columns for table wish_cost. +var wishCostColumns = WishCostColumns{ + Id: "id", + Jwcode: "jwcode", + WishId: "wish_id", + Coin: "coin", + Status: "status", + Msg: "msg", + CreatedAt: "created_at", +} + +// NewWishCostDao creates and returns a new DAO object for table data access. +func NewWishCostDao() *WishCostDao { + return &WishCostDao{ + group: "default", + table: "wish_cost", + columns: wishCostColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *WishCostDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *WishCostDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *WishCostDao) Columns() WishCostColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *WishCostDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *WishCostDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *WishCostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/wish_related.go b/internal/dao/internal/wish_related.go new file mode 100644 index 0000000..66baa67 --- /dev/null +++ b/internal/dao/internal/wish_related.go @@ -0,0 +1,77 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// WishRelatedDao is the data access object for table wish_related. +type WishRelatedDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns WishRelatedColumns // columns contains all the column names of Table for convenient usage. +} + +// WishRelatedColumns defines and stores column names for table wish_related. +type WishRelatedColumns struct { + Id string // + WishId string // 心愿ID + NoticeId string // 公告ID +} + +// wishRelatedColumns holds the columns for table wish_related. +var wishRelatedColumns = WishRelatedColumns{ + Id: "id", + WishId: "wish_id", + NoticeId: "notice_id", +} + +// NewWishRelatedDao creates and returns a new DAO object for table data access. +func NewWishRelatedDao() *WishRelatedDao { + return &WishRelatedDao{ + group: "default", + table: "wish_related", + columns: wishRelatedColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *WishRelatedDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *WishRelatedDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *WishRelatedDao) Columns() WishRelatedColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *WishRelatedDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *WishRelatedDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *WishRelatedDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/wish_state.go b/internal/dao/internal/wish_state.go new file mode 100644 index 0000000..52487ef --- /dev/null +++ b/internal/dao/internal/wish_state.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// WishStateDao is the data access object for table wish_state. +type WishStateDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns WishStateColumns // columns contains all the column names of Table for convenient usage. +} + +// WishStateColumns defines and stores column names for table wish_state. +type WishStateColumns struct { + Id string // + Language string // + Type string // + Name string // +} + +// wishStateColumns holds the columns for table wish_state. +var wishStateColumns = WishStateColumns{ + Id: "id", + Language: "language", + Type: "type", + Name: "name", +} + +// NewWishStateDao creates and returns a new DAO object for table data access. +func NewWishStateDao() *WishStateDao { + return &WishStateDao{ + group: "default", + table: "wish_state", + columns: wishStateColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *WishStateDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *WishStateDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *WishStateDao) Columns() WishStateColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *WishStateDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *WishStateDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *WishStateDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/wish_translate.go b/internal/dao/internal/wish_translate.go new file mode 100644 index 0000000..27810d7 --- /dev/null +++ b/internal/dao/internal/wish_translate.go @@ -0,0 +1,83 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// WishTranslateDao is the data access object for table wish_translate. +type WishTranslateDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns WishTranslateColumns // columns contains all the column names of Table for convenient usage. +} + +// WishTranslateColumns defines and stores column names for table wish_translate. +type WishTranslateColumns struct { + Id string // + WishId string // + SourceLanguage string // + TargetLanguage string // + Title string // + Content string // +} + +// wishTranslateColumns holds the columns for table wish_translate. +var wishTranslateColumns = WishTranslateColumns{ + Id: "id", + WishId: "wish_id", + SourceLanguage: "source_language", + TargetLanguage: "target_language", + Title: "title", + Content: "content", +} + +// NewWishTranslateDao creates and returns a new DAO object for table data access. +func NewWishTranslateDao() *WishTranslateDao { + return &WishTranslateDao{ + group: "default", + table: "wish_translate", + columns: wishTranslateColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *WishTranslateDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *WishTranslateDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *WishTranslateDao) Columns() WishTranslateColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *WishTranslateDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *WishTranslateDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *WishTranslateDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/wish_zan.go b/internal/dao/internal/wish_zan.go new file mode 100644 index 0000000..7e6e491 --- /dev/null +++ b/internal/dao/internal/wish_zan.go @@ -0,0 +1,79 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// WishZanDao is the data access object for table wish_zan. +type WishZanDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns WishZanColumns // columns contains all the column names of Table for convenient usage. +} + +// WishZanColumns defines and stores column names for table wish_zan. +type WishZanColumns struct { + Id string // + Jwcode string // + WishId string // + CreatedAt string // +} + +// wishZanColumns holds the columns for table wish_zan. +var wishZanColumns = WishZanColumns{ + Id: "id", + Jwcode: "jwcode", + WishId: "wish_id", + CreatedAt: "created_at", +} + +// NewWishZanDao creates and returns a new DAO object for table data access. +func NewWishZanDao() *WishZanDao { + return &WishZanDao{ + group: "default", + table: "wish_zan", + columns: wishZanColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *WishZanDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *WishZanDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *WishZanDao) Columns() WishZanColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *WishZanDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *WishZanDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *WishZanDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/lecturers.go b/internal/dao/lecturers.go new file mode 100644 index 0000000..b274496 --- /dev/null +++ b/internal/dao/lecturers.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalLecturersDao is internal type for wrapping internal DAO implements. +type internalLecturersDao = *internal.LecturersDao + +// lecturersDao is the data access object for table lecturers. +// You can define custom methods on it to extend its functionality as you wish. +type lecturersDao struct { + internalLecturersDao +} + +var ( + // Lecturers is globally public accessible object for table lecturers operations. + Lecturers = lecturersDao{ + internal.NewLecturersDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/manager.go b/internal/dao/manager.go new file mode 100644 index 0000000..ac1211a --- /dev/null +++ b/internal/dao/manager.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalManagerDao is internal type for wrapping internal DAO implements. +type internalManagerDao = *internal.ManagerDao + +// managerDao is the data access object for table manager. +// You can define custom methods on it to extend its functionality as you wish. +type managerDao struct { + internalManagerDao +} + +var ( + // Manager is globally public accessible object for table manager operations. + Manager = managerDao{ + internal.NewManagerDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/member_info.go b/internal/dao/member_info.go new file mode 100644 index 0000000..ffa3011 --- /dev/null +++ b/internal/dao/member_info.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalMemberInfoDao is internal type for wrapping internal DAO implements. +type internalMemberInfoDao = *internal.MemberInfoDao + +// memberInfoDao is the data access object for table member_info. +// You can define custom methods on it to extend its functionality as you wish. +type memberInfoDao struct { + internalMemberInfoDao +} + +var ( + // MemberInfo is globally public accessible object for table member_info operations. + MemberInfo = memberInfoDao{ + internal.NewMemberInfoDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/notice.go b/internal/dao/notice.go new file mode 100644 index 0000000..44fbf0b --- /dev/null +++ b/internal/dao/notice.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalNoticeDao is internal type for wrapping internal DAO implements. +type internalNoticeDao = *internal.NoticeDao + +// noticeDao is the data access object for table notice. +// You can define custom methods on it to extend its functionality as you wish. +type noticeDao struct { + internalNoticeDao +} + +var ( + // Notice is globally public accessible object for table notice operations. + Notice = noticeDao{ + internal.NewNoticeDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/product.go b/internal/dao/product.go new file mode 100644 index 0000000..0297954 --- /dev/null +++ b/internal/dao/product.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalProductDao is internal type for wrapping internal DAO implements. +type internalProductDao = *internal.ProductDao + +// productDao is the data access object for table product. +// You can define custom methods on it to extend its functionality as you wish. +type productDao struct { + internalProductDao +} + +var ( + // Product is globally public accessible object for table product operations. + Product = productDao{ + internal.NewProductDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/subject.go b/internal/dao/subject.go new file mode 100644 index 0000000..0fe1493 --- /dev/null +++ b/internal/dao/subject.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalSubjectDao is internal type for wrapping internal DAO implements. +type internalSubjectDao = *internal.SubjectDao + +// subjectDao is the data access object for table subject. +// You can define custom methods on it to extend its functionality as you wish. +type subjectDao struct { + internalSubjectDao +} + +var ( + // Subject is globally public accessible object for table subject operations. + Subject = subjectDao{ + internal.NewSubjectDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/support.go b/internal/dao/support.go new file mode 100644 index 0000000..c6105aa --- /dev/null +++ b/internal/dao/support.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalSupportDao is internal type for wrapping internal DAO implements. +type internalSupportDao = *internal.SupportDao + +// supportDao is the data access object for table support. +// You can define custom methods on it to extend its functionality as you wish. +type supportDao struct { + internalSupportDao +} + +var ( + // Support is globally public accessible object for table support operations. + Support = supportDao{ + internal.NewSupportDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/transaction_lecturer_records.go b/internal/dao/transaction_lecturer_records.go new file mode 100644 index 0000000..99d2b90 --- /dev/null +++ b/internal/dao/transaction_lecturer_records.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalTransactionLecturerRecordsDao is internal type for wrapping internal DAO implements. +type internalTransactionLecturerRecordsDao = *internal.TransactionLecturerRecordsDao + +// transactionLecturerRecordsDao is the data access object for table transaction_lecturer_records. +// You can define custom methods on it to extend its functionality as you wish. +type transactionLecturerRecordsDao struct { + internalTransactionLecturerRecordsDao +} + +var ( + // TransactionLecturerRecords is globally public accessible object for table transaction_lecturer_records operations. + TransactionLecturerRecords = transactionLecturerRecordsDao{ + internal.NewTransactionLecturerRecordsDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/transaction_plan_files.go b/internal/dao/transaction_plan_files.go new file mode 100644 index 0000000..e19273a --- /dev/null +++ b/internal/dao/transaction_plan_files.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalTransactionPlanFilesDao is internal type for wrapping internal DAO implements. +type internalTransactionPlanFilesDao = *internal.TransactionPlanFilesDao + +// transactionPlanFilesDao is the data access object for table transaction_plan_files. +// You can define custom methods on it to extend its functionality as you wish. +type transactionPlanFilesDao struct { + internalTransactionPlanFilesDao +} + +var ( + // TransactionPlanFiles is globally public accessible object for table transaction_plan_files operations. + TransactionPlanFiles = transactionPlanFilesDao{ + internal.NewTransactionPlanFilesDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/vote_1_indicators.go b/internal/dao/vote_1_indicators.go new file mode 100644 index 0000000..69a2aa2 --- /dev/null +++ b/internal/dao/vote_1_indicators.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalVote1IndicatorsDao is internal type for wrapping internal DAO implements. +type internalVote1IndicatorsDao = *internal.Vote1IndicatorsDao + +// vote1IndicatorsDao is the data access object for table vote1_indicators. +// You can define custom methods on it to extend its functionality as you wish. +type vote1IndicatorsDao struct { + internalVote1IndicatorsDao +} + +var ( + // Vote1Indicators is globally public accessible object for table vote1_indicators operations. + Vote1Indicators = vote1IndicatorsDao{ + internal.NewVote1IndicatorsDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/vote_1_records.go b/internal/dao/vote_1_records.go new file mode 100644 index 0000000..f578f53 --- /dev/null +++ b/internal/dao/vote_1_records.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalVote1RecordsDao is internal type for wrapping internal DAO implements. +type internalVote1RecordsDao = *internal.Vote1RecordsDao + +// vote1RecordsDao is the data access object for table vote1_records. +// You can define custom methods on it to extend its functionality as you wish. +type vote1RecordsDao struct { + internalVote1RecordsDao +} + +var ( + // Vote1Records is globally public accessible object for table vote1_records operations. + Vote1Records = vote1RecordsDao{ + internal.NewVote1RecordsDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/vote_1_virtual_records.go b/internal/dao/vote_1_virtual_records.go new file mode 100644 index 0000000..3598380 --- /dev/null +++ b/internal/dao/vote_1_virtual_records.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalVote1VirtualRecordsDao is internal type for wrapping internal DAO implements. +type internalVote1VirtualRecordsDao = *internal.Vote1VirtualRecordsDao + +// vote1VirtualRecordsDao is the data access object for table vote1_virtual_records. +// You can define custom methods on it to extend its functionality as you wish. +type vote1VirtualRecordsDao struct { + internalVote1VirtualRecordsDao +} + +var ( + // Vote1VirtualRecords is globally public accessible object for table vote1_virtual_records operations. + Vote1VirtualRecords = vote1VirtualRecordsDao{ + internal.NewVote1VirtualRecordsDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/vote_indicators.go b/internal/dao/vote_indicators.go new file mode 100644 index 0000000..6d6d8a3 --- /dev/null +++ b/internal/dao/vote_indicators.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalVoteIndicatorsDao is internal type for wrapping internal DAO implements. +type internalVoteIndicatorsDao = *internal.VoteIndicatorsDao + +// voteIndicatorsDao is the data access object for table vote_indicators. +// You can define custom methods on it to extend its functionality as you wish. +type voteIndicatorsDao struct { + internalVoteIndicatorsDao +} + +var ( + // VoteIndicators is globally public accessible object for table vote_indicators operations. + VoteIndicators = voteIndicatorsDao{ + internal.NewVoteIndicatorsDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/vote_records.go b/internal/dao/vote_records.go new file mode 100644 index 0000000..8a3d838 --- /dev/null +++ b/internal/dao/vote_records.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalVoteRecordsDao is internal type for wrapping internal DAO implements. +type internalVoteRecordsDao = *internal.VoteRecordsDao + +// voteRecordsDao is the data access object for table vote_records. +// You can define custom methods on it to extend its functionality as you wish. +type voteRecordsDao struct { + internalVoteRecordsDao +} + +var ( + // VoteRecords is globally public accessible object for table vote_records operations. + VoteRecords = voteRecordsDao{ + internal.NewVoteRecordsDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/wish.go b/internal/dao/wish.go new file mode 100644 index 0000000..f97f449 --- /dev/null +++ b/internal/dao/wish.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalWishDao is internal type for wrapping internal DAO implements. +type internalWishDao = *internal.WishDao + +// wishDao is the data access object for table wish. +// You can define custom methods on it to extend its functionality as you wish. +type wishDao struct { + internalWishDao +} + +var ( + // Wish is globally public accessible object for table wish operations. + Wish = wishDao{ + internal.NewWishDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/wish_cost.go b/internal/dao/wish_cost.go new file mode 100644 index 0000000..d8450d6 --- /dev/null +++ b/internal/dao/wish_cost.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalWishCostDao is internal type for wrapping internal DAO implements. +type internalWishCostDao = *internal.WishCostDao + +// wishCostDao is the data access object for table wish_cost. +// You can define custom methods on it to extend its functionality as you wish. +type wishCostDao struct { + internalWishCostDao +} + +var ( + // WishCost is globally public accessible object for table wish_cost operations. + WishCost = wishCostDao{ + internal.NewWishCostDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/wish_related.go b/internal/dao/wish_related.go new file mode 100644 index 0000000..518d8ae --- /dev/null +++ b/internal/dao/wish_related.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalWishRelatedDao is internal type for wrapping internal DAO implements. +type internalWishRelatedDao = *internal.WishRelatedDao + +// wishRelatedDao is the data access object for table wish_related. +// You can define custom methods on it to extend its functionality as you wish. +type wishRelatedDao struct { + internalWishRelatedDao +} + +var ( + // WishRelated is globally public accessible object for table wish_related operations. + WishRelated = wishRelatedDao{ + internal.NewWishRelatedDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/wish_state.go b/internal/dao/wish_state.go new file mode 100644 index 0000000..806bb0a --- /dev/null +++ b/internal/dao/wish_state.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalWishStateDao is internal type for wrapping internal DAO implements. +type internalWishStateDao = *internal.WishStateDao + +// wishStateDao is the data access object for table wish_state. +// You can define custom methods on it to extend its functionality as you wish. +type wishStateDao struct { + internalWishStateDao +} + +var ( + // WishState is globally public accessible object for table wish_state operations. + WishState = wishStateDao{ + internal.NewWishStateDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/wish_translate.go b/internal/dao/wish_translate.go new file mode 100644 index 0000000..015279a --- /dev/null +++ b/internal/dao/wish_translate.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalWishTranslateDao is internal type for wrapping internal DAO implements. +type internalWishTranslateDao = *internal.WishTranslateDao + +// wishTranslateDao is the data access object for table wish_translate. +// You can define custom methods on it to extend its functionality as you wish. +type wishTranslateDao struct { + internalWishTranslateDao +} + +var ( + // WishTranslate is globally public accessible object for table wish_translate operations. + WishTranslate = wishTranslateDao{ + internal.NewWishTranslateDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/wish_zan.go b/internal/dao/wish_zan.go new file mode 100644 index 0000000..e33a1f4 --- /dev/null +++ b/internal/dao/wish_zan.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "VoteManage_Go/internal/dao/internal" +) + +// internalWishZanDao is internal type for wrapping internal DAO implements. +type internalWishZanDao = *internal.WishZanDao + +// wishZanDao is the data access object for table wish_zan. +// You can define custom methods on it to extend its functionality as you wish. +type wishZanDao struct { + internalWishZanDao +} + +var ( + // WishZan is globally public accessible object for table wish_zan operations. + WishZan = wishZanDao{ + internal.NewWishZanDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/logic/.gitkeep b/internal/logic/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/internal/model/.gitkeep b/internal/model/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/internal/model/do/.gitkeep b/internal/model/do/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/internal/model/do/able_sign_users.go b/internal/model/do/able_sign_users.go new file mode 100644 index 0000000..d6ca79c --- /dev/null +++ b/internal/model/do/able_sign_users.go @@ -0,0 +1,17 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// AbleSignUsers is the golang structure of table able_sign_users for DAO operations like Where/Data. +type AbleSignUsers struct { + g.Meta `orm:"table:able_sign_users, do:true"` + Id interface{} // + Jwcode interface{} // + Type interface{} // 1 博股会员 2 信息费5年 3 购买三个指标 +} diff --git a/internal/model/do/comment.go b/internal/model/do/comment.go new file mode 100644 index 0000000..5c96866 --- /dev/null +++ b/internal/model/do/comment.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// Comment is the golang structure of table comment for DAO operations like Where/Data. +type Comment struct { + g.Meta `orm:"table:comment, do:true"` + Id interface{} // + WishId interface{} // 心愿ID + Jwcode interface{} // 评论人code + Content interface{} // 评论内容 + Image interface{} // 图片,多张图片用json格式保存 + ReplyNum interface{} // 回复数 + Pid interface{} // 父级评论ID + Delete interface{} // 0正常1删除 + CreatedAt interface{} // 评论时间 +} diff --git a/internal/model/do/comment_zan.go b/internal/model/do/comment_zan.go new file mode 100644 index 0000000..07000dc --- /dev/null +++ b/internal/model/do/comment_zan.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// CommentZan is the golang structure of table comment_zan for DAO operations like Where/Data. +type CommentZan struct { + g.Meta `orm:"table:comment_zan, do:true"` + Id interface{} // + Jwcode interface{} // + CommentId interface{} // + CreatedAt interface{} // +} diff --git a/internal/model/do/experience_officer_sign.go b/internal/model/do/experience_officer_sign.go new file mode 100644 index 0000000..6c5042c --- /dev/null +++ b/internal/model/do/experience_officer_sign.go @@ -0,0 +1,24 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// ExperienceOfficerSign is the golang structure of table experience_officer_sign for DAO operations like Where/Data. +type ExperienceOfficerSign struct { + g.Meta `orm:"table:experience_officer_sign, do:true"` + Id interface{} // + Jwcode interface{} // + Time interface{} // + State interface{} // 1 报名用户 + Location interface{} // 1 新加坡 2 马来 3 香港 4 美股 5 A股 + Identity interface{} // 1 博股会员 2 金卡会员 + ReservationCode interface{} // + Seat interface{} // + Date *gtime.Time // +} diff --git a/internal/model/do/experience_officer_vote.go b/internal/model/do/experience_officer_vote.go new file mode 100644 index 0000000..216d6cf --- /dev/null +++ b/internal/model/do/experience_officer_vote.go @@ -0,0 +1,24 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// ExperienceOfficerVote is the golang structure of table experience_officer_vote for DAO operations like Where/Data. +type ExperienceOfficerVote struct { + g.Meta `orm:"table:experience_officer_vote, do:true"` + Id interface{} // + Jwcode interface{} // + Time interface{} // + State interface{} // 1 报名用户 + Location interface{} // 1 新加坡 2 马来 3 香港 4 美股 5 A股 + Identity interface{} // 1 博股会员 2 金卡会员 + ReservationCode interface{} // + Seat interface{} // + Date *gtime.Time // +} diff --git a/internal/model/do/hot_jwcode.go b/internal/model/do/hot_jwcode.go new file mode 100644 index 0000000..3e4369c --- /dev/null +++ b/internal/model/do/hot_jwcode.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// HotJwcode is the golang structure of table hot_jwcode for DAO operations like Where/Data. +type HotJwcode struct { + g.Meta `orm:"table:hot_jwcode, do:true"` + Id interface{} // + Jwcode interface{} // 精网号 + Hot interface{} // 热度值 + UpdatedAt interface{} // +} diff --git a/internal/model/do/hot_subject.go b/internal/model/do/hot_subject.go new file mode 100644 index 0000000..2bb3f88 --- /dev/null +++ b/internal/model/do/hot_subject.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// HotSubject is the golang structure of table hot_subject for DAO operations like Where/Data. +type HotSubject struct { + g.Meta `orm:"table:hot_subject, do:true"` + Id interface{} // + SubjectId interface{} // 话题ID + Hot interface{} // 热度值 + UpdatedAt interface{} // +} diff --git a/internal/model/do/hot_wish.go b/internal/model/do/hot_wish.go new file mode 100644 index 0000000..ae89673 --- /dev/null +++ b/internal/model/do/hot_wish.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// HotWish is the golang structure of table hot_wish for DAO operations like Where/Data. +type HotWish struct { + g.Meta `orm:"table:hot_wish, do:true"` + Id interface{} // + WishId interface{} // 心愿ID + Hot interface{} // 热度值 + UpdatedAt interface{} // +} diff --git a/internal/model/do/lecturers.go b/internal/model/do/lecturers.go new file mode 100644 index 0000000..456ab86 --- /dev/null +++ b/internal/model/do/lecturers.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// Lecturers is the golang structure of table lecturers for DAO operations like Where/Data. +type Lecturers struct { + g.Meta `orm:"table:lecturers, do:true"` + Id interface{} // + Jwcode interface{} // + Avatar interface{} // + Name interface{} // +} diff --git a/internal/model/do/manager.go b/internal/model/do/manager.go new file mode 100644 index 0000000..1eb3b15 --- /dev/null +++ b/internal/model/do/manager.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// Manager is the golang structure of table manager for DAO operations like Where/Data. +type Manager struct { + g.Meta `orm:"table:manager, do:true"` + Id interface{} // + Jwcode interface{} // + Name interface{} // + Type interface{} // 产品ID + LanguageKey interface{} // + Enabled interface{} // + CreatedAt interface{} // +} diff --git a/internal/model/do/member_info.go b/internal/model/do/member_info.go new file mode 100644 index 0000000..aa529ce --- /dev/null +++ b/internal/model/do/member_info.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// MemberInfo is the golang structure of table member_info for DAO operations like Where/Data. +type MemberInfo struct { + g.Meta `orm:"table:member_info, do:true"` + Id interface{} // + Jwcode interface{} // + Nickname interface{} // + Img interface{} // + Medal interface{} // 体验官勋章url + LocMarket interface{} // + Dept interface{} // + Shop interface{} // + BoguMember interface{} // 1:博股会员,0:不是 +} diff --git a/internal/model/do/notice.go b/internal/model/do/notice.go new file mode 100644 index 0000000..c6d1e85 --- /dev/null +++ b/internal/model/do/notice.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// Notice is the golang structure of table notice for DAO operations like Where/Data. +type Notice struct { + g.Meta `orm:"table:notice, do:true"` + Id interface{} // + Type interface{} // 1进度修改2评论3点赞 + WishId interface{} // 心愿ID + CommentId interface{} // + Jwcode interface{} // 操作人 + NoticeJwcode interface{} // 通知人 + State interface{} // 0新通知1已看 + WishState interface{} // 把心愿改成的状态 + CreatedAt interface{} // +} diff --git a/internal/model/do/product.go b/internal/model/do/product.go new file mode 100644 index 0000000..4a1eb09 --- /dev/null +++ b/internal/model/do/product.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// Product is the golang structure of table product for DAO operations like Where/Data. +type Product struct { + g.Meta `orm:"table:product, do:true"` + Id interface{} // + Name interface{} // + Enabled interface{} // + ZhCN interface{} // +} diff --git a/internal/model/do/subject.go b/internal/model/do/subject.go new file mode 100644 index 0000000..e5d6d0b --- /dev/null +++ b/internal/model/do/subject.go @@ -0,0 +1,17 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// Subject is the golang structure of table subject for DAO operations like Where/Data. +type Subject struct { + g.Meta `orm:"table:subject, do:true"` + Id interface{} // + Type interface{} // + Content interface{} // +} diff --git a/internal/model/do/support.go b/internal/model/do/support.go new file mode 100644 index 0000000..a07a974 --- /dev/null +++ b/internal/model/do/support.go @@ -0,0 +1,19 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// Support is the golang structure of table support for DAO operations like Where/Data. +type Support struct { + g.Meta `orm:"table:support, do:true"` + Id interface{} // + Jwcode interface{} // 用户标识 + WishId interface{} // 心愿ID + Type interface{} // 1支持2反对 + CreatedAt interface{} // 时间 +} diff --git a/internal/model/do/transaction_lecturer_records.go b/internal/model/do/transaction_lecturer_records.go new file mode 100644 index 0000000..a36d285 --- /dev/null +++ b/internal/model/do/transaction_lecturer_records.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// TransactionLecturerRecords is the golang structure of table transaction_lecturer_records for DAO operations like Where/Data. +type TransactionLecturerRecords struct { + g.Meta `orm:"table:transaction_lecturer_records, do:true"` + Id interface{} // + Jwcode interface{} // + LecturerJwcode interface{} // + Time interface{} // +} diff --git a/internal/model/do/transaction_plan_files.go b/internal/model/do/transaction_plan_files.go new file mode 100644 index 0000000..6d58ee3 --- /dev/null +++ b/internal/model/do/transaction_plan_files.go @@ -0,0 +1,19 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// TransactionPlanFiles is the golang structure of table transaction_plan_files for DAO operations like Where/Data. +type TransactionPlanFiles struct { + g.Meta `orm:"table:transaction_plan_files, do:true"` + Id interface{} // + Jwcode interface{} // + Content interface{} // + Time interface{} // 提交时间 + EncryptionId interface{} // +} diff --git a/internal/model/do/vote_1_indicators.go b/internal/model/do/vote_1_indicators.go new file mode 100644 index 0000000..d27d7a2 --- /dev/null +++ b/internal/model/do/vote_1_indicators.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// Vote1Indicators is the golang structure of table vote1_indicators for DAO operations like Where/Data. +type Vote1Indicators struct { + g.Meta `orm:"table:vote1_indicators, do:true"` + Id interface{} // + Title interface{} // + Description interface{} // + Img interface{} // +} diff --git a/internal/model/do/vote_1_records.go b/internal/model/do/vote_1_records.go new file mode 100644 index 0000000..08c2047 --- /dev/null +++ b/internal/model/do/vote_1_records.go @@ -0,0 +1,20 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// Vote1Records is the golang structure of table vote1_records for DAO operations like Where/Data. +type Vote1Records struct { + g.Meta `orm:"table:vote1_records, do:true"` + Id interface{} // + Jwcode interface{} // + VId interface{} // + VoteDate *gtime.Time // + Time interface{} // +} diff --git a/internal/model/do/vote_1_virtual_records.go b/internal/model/do/vote_1_virtual_records.go new file mode 100644 index 0000000..53fbfda --- /dev/null +++ b/internal/model/do/vote_1_virtual_records.go @@ -0,0 +1,20 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// Vote1VirtualRecords is the golang structure of table vote1_virtual_records for DAO operations like Where/Data. +type Vote1VirtualRecords struct { + g.Meta `orm:"table:vote1_virtual_records, do:true"` + Id interface{} // + VId interface{} // + Votes interface{} // + VoteDate *gtime.Time // + Time interface{} // +} diff --git a/internal/model/do/vote_indicators.go b/internal/model/do/vote_indicators.go new file mode 100644 index 0000000..e9ece08 --- /dev/null +++ b/internal/model/do/vote_indicators.go @@ -0,0 +1,17 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// VoteIndicators is the golang structure of table vote_indicators for DAO operations like Where/Data. +type VoteIndicators struct { + g.Meta `orm:"table:vote_indicators, do:true"` + Id interface{} // + Title interface{} // + Num interface{} // 选择人数 +} diff --git a/internal/model/do/vote_records.go b/internal/model/do/vote_records.go new file mode 100644 index 0000000..7b9f4a0 --- /dev/null +++ b/internal/model/do/vote_records.go @@ -0,0 +1,20 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// VoteRecords is the golang structure of table vote_records for DAO operations like Where/Data. +type VoteRecords struct { + g.Meta `orm:"table:vote_records, do:true"` + Id interface{} // + Jwcode interface{} // + VoteDate *gtime.Time // + Time interface{} // + OptionsTitle interface{} // +} diff --git a/internal/model/do/wish.go b/internal/model/do/wish.go new file mode 100644 index 0000000..1a4031a --- /dev/null +++ b/internal/model/do/wish.go @@ -0,0 +1,41 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// Wish is the golang structure of table wish for DAO operations like Where/Data. +type Wish struct { + g.Meta `orm:"table:wish, do:true"` + Id interface{} // + Jwcode interface{} // 用户标识 + Title interface{} // 心愿名称 + Content interface{} // 心愿内容 + Image interface{} // 图片,多张图片用json格式保存 + Type interface{} // 1精网2弘历软件3大财神4锦囊5L-2产品 + Status interface{} // 0隐藏1待处理2排期中3在开发4已上线 + Support interface{} // 点赞数 + Opposition interface{} // 反对数 + Comment interface{} // 评论数 + Fee interface{} // 打赏当午券数 + FeeNum interface{} // 打赏人数 + Vote interface{} // 总票数 + Zan interface{} // 点赞数 + See interface{} // 观看数 + Class interface{} // 1心愿2公告 + Label interface{} // 1软件bug2产品需求3市场建议 + Delete interface{} // 0正常1删除2隐藏 + ManagerJwcode interface{} // 负责人的jwcode + Order interface{} // 排序 + Coding interface{} // 是否经过开发 + DeadLine *gtime.Time // 上线日期 + Language interface{} // + SubjectId interface{} // 话题ID + CreatedAt interface{} // + UpdatedAt interface{} // +} diff --git a/internal/model/do/wish_cost.go b/internal/model/do/wish_cost.go new file mode 100644 index 0000000..777badb --- /dev/null +++ b/internal/model/do/wish_cost.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// WishCost is the golang structure of table wish_cost for DAO operations like Where/Data. +type WishCost struct { + g.Meta `orm:"table:wish_cost, do:true"` + Id interface{} // + Jwcode interface{} // + WishId interface{} // + Coin interface{} // + Status interface{} // 1新建2成功3未成功 + Msg interface{} // + CreatedAt interface{} // +} diff --git a/internal/model/do/wish_related.go b/internal/model/do/wish_related.go new file mode 100644 index 0000000..f8b4d87 --- /dev/null +++ b/internal/model/do/wish_related.go @@ -0,0 +1,17 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// WishRelated is the golang structure of table wish_related for DAO operations like Where/Data. +type WishRelated struct { + g.Meta `orm:"table:wish_related, do:true"` + Id interface{} // + WishId interface{} // 心愿ID + NoticeId interface{} // 公告ID +} diff --git a/internal/model/do/wish_state.go b/internal/model/do/wish_state.go new file mode 100644 index 0000000..4f86218 --- /dev/null +++ b/internal/model/do/wish_state.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// WishState is the golang structure of table wish_state for DAO operations like Where/Data. +type WishState struct { + g.Meta `orm:"table:wish_state, do:true"` + Id interface{} // + Language interface{} // + Type interface{} // + Name interface{} // +} diff --git a/internal/model/do/wish_translate.go b/internal/model/do/wish_translate.go new file mode 100644 index 0000000..c67fd55 --- /dev/null +++ b/internal/model/do/wish_translate.go @@ -0,0 +1,20 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// WishTranslate is the golang structure of table wish_translate for DAO operations like Where/Data. +type WishTranslate struct { + g.Meta `orm:"table:wish_translate, do:true"` + Id interface{} // + WishId interface{} // + SourceLanguage interface{} // + TargetLanguage interface{} // + Title interface{} // + Content interface{} // +} diff --git a/internal/model/do/wish_zan.go b/internal/model/do/wish_zan.go new file mode 100644 index 0000000..38e4f2e --- /dev/null +++ b/internal/model/do/wish_zan.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// WishZan is the golang structure of table wish_zan for DAO operations like Where/Data. +type WishZan struct { + g.Meta `orm:"table:wish_zan, do:true"` + Id interface{} // + Jwcode interface{} // + WishId interface{} // + CreatedAt interface{} // +} diff --git a/internal/model/entity/.gitkeep b/internal/model/entity/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/internal/model/entity/able_sign_users.go b/internal/model/entity/able_sign_users.go new file mode 100644 index 0000000..45e79c6 --- /dev/null +++ b/internal/model/entity/able_sign_users.go @@ -0,0 +1,12 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// AbleSignUsers is the golang structure for table able_sign_users. +type AbleSignUsers struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + Type int `json:"type" orm:"type" description:"1 博股会员 2 信息费5年 3 购买三个指标"` // 1 博股会员 2 信息费5年 3 购买三个指标 +} diff --git a/internal/model/entity/comment.go b/internal/model/entity/comment.go new file mode 100644 index 0000000..65227e2 --- /dev/null +++ b/internal/model/entity/comment.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// Comment is the golang structure for table comment. +type Comment struct { + Id uint `json:"id" orm:"id" description:""` // + WishId int `json:"wishId" orm:"wish_id" description:"心愿ID"` // 心愿ID + Jwcode int `json:"jwcode" orm:"jwcode" description:"评论人code"` // 评论人code + Content string `json:"content" orm:"content" description:"评论内容"` // 评论内容 + Image string `json:"image" orm:"image" description:"图片,多张图片用json格式保存"` // 图片,多张图片用json格式保存 + ReplyNum int `json:"replyNum" orm:"reply_num" description:"回复数"` // 回复数 + Pid int `json:"pid" orm:"pid" description:"父级评论ID"` // 父级评论ID + Delete int `json:"delete" orm:"delete" description:"0正常1删除"` // 0正常1删除 + CreatedAt int `json:"createdAt" orm:"created_at" description:"评论时间"` // 评论时间 +} diff --git a/internal/model/entity/comment_zan.go b/internal/model/entity/comment_zan.go new file mode 100644 index 0000000..d367e6a --- /dev/null +++ b/internal/model/entity/comment_zan.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// CommentZan is the golang structure for table comment_zan. +type CommentZan struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + CommentId int `json:"commentId" orm:"comment_id" description:""` // + CreatedAt int `json:"createdAt" orm:"created_at" description:""` // +} diff --git a/internal/model/entity/experience_officer_sign.go b/internal/model/entity/experience_officer_sign.go new file mode 100644 index 0000000..10ce64f --- /dev/null +++ b/internal/model/entity/experience_officer_sign.go @@ -0,0 +1,22 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// ExperienceOfficerSign is the golang structure for table experience_officer_sign. +type ExperienceOfficerSign struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + Time int `json:"time" orm:"time" description:""` // + State int `json:"state" orm:"state" description:"1 报名用户"` // 1 报名用户 + Location int `json:"location" orm:"location" description:"1 新加坡 2 马来 3 香港 4 美股 5 A股"` // 1 新加坡 2 马来 3 香港 4 美股 5 A股 + Identity int `json:"identity" orm:"identity" description:"1 博股会员 2 金卡会员"` // 1 博股会员 2 金卡会员 + ReservationCode string `json:"reservationCode" orm:"reservation_code" description:""` // + Seat string `json:"seat" orm:"seat" description:""` // + Date *gtime.Time `json:"date" orm:"date" description:""` // +} diff --git a/internal/model/entity/experience_officer_vote.go b/internal/model/entity/experience_officer_vote.go new file mode 100644 index 0000000..422b8f5 --- /dev/null +++ b/internal/model/entity/experience_officer_vote.go @@ -0,0 +1,22 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// ExperienceOfficerVote is the golang structure for table experience_officer_vote. +type ExperienceOfficerVote struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + Time int `json:"time" orm:"time" description:""` // + State int `json:"state" orm:"state" description:"1 报名用户"` // 1 报名用户 + Location int `json:"location" orm:"location" description:"1 新加坡 2 马来 3 香港 4 美股 5 A股"` // 1 新加坡 2 马来 3 香港 4 美股 5 A股 + Identity int `json:"identity" orm:"identity" description:"1 博股会员 2 金卡会员"` // 1 博股会员 2 金卡会员 + ReservationCode string `json:"reservationCode" orm:"reservation_code" description:""` // + Seat string `json:"seat" orm:"seat" description:""` // + Date *gtime.Time `json:"date" orm:"date" description:""` // +} diff --git a/internal/model/entity/hot_jwcode.go b/internal/model/entity/hot_jwcode.go new file mode 100644 index 0000000..a8a15fa --- /dev/null +++ b/internal/model/entity/hot_jwcode.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// HotJwcode is the golang structure for table hot_jwcode. +type HotJwcode struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:"精网号"` // 精网号 + Hot int `json:"hot" orm:"hot" description:"热度值"` // 热度值 + UpdatedAt int `json:"updatedAt" orm:"updated_at" description:""` // +} diff --git a/internal/model/entity/hot_subject.go b/internal/model/entity/hot_subject.go new file mode 100644 index 0000000..1a3d935 --- /dev/null +++ b/internal/model/entity/hot_subject.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// HotSubject is the golang structure for table hot_subject. +type HotSubject struct { + Id uint `json:"id" orm:"id" description:""` // + SubjectId int `json:"subjectId" orm:"subject_id" description:"话题ID"` // 话题ID + Hot int `json:"hot" orm:"hot" description:"热度值"` // 热度值 + UpdatedAt int `json:"updatedAt" orm:"updated_at" description:""` // +} diff --git a/internal/model/entity/hot_wish.go b/internal/model/entity/hot_wish.go new file mode 100644 index 0000000..9a9d0c8 --- /dev/null +++ b/internal/model/entity/hot_wish.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// HotWish is the golang structure for table hot_wish. +type HotWish struct { + Id uint `json:"id" orm:"id" description:""` // + WishId int `json:"wishId" orm:"wish_id" description:"心愿ID"` // 心愿ID + Hot int `json:"hot" orm:"hot" description:"热度值"` // 热度值 + UpdatedAt int `json:"updatedAt" orm:"updated_at" description:""` // +} diff --git a/internal/model/entity/lecturers.go b/internal/model/entity/lecturers.go new file mode 100644 index 0000000..3e4bdd8 --- /dev/null +++ b/internal/model/entity/lecturers.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// Lecturers is the golang structure for table lecturers. +type Lecturers struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + Avatar string `json:"avatar" orm:"avatar" description:""` // + Name string `json:"name" orm:"name" description:""` // +} diff --git a/internal/model/entity/manager.go b/internal/model/entity/manager.go new file mode 100644 index 0000000..6f9b3df --- /dev/null +++ b/internal/model/entity/manager.go @@ -0,0 +1,16 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// Manager is the golang structure for table manager. +type Manager struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + Name string `json:"name" orm:"name" description:""` // + Type int `json:"type" orm:"type" description:"产品ID"` // 产品ID + LanguageKey string `json:"languageKey" orm:"language_key" description:""` // + Enabled int `json:"enabled" orm:"enabled" description:""` // + CreatedAt int `json:"createdAt" orm:"created_at" description:""` // +} diff --git a/internal/model/entity/member_info.go b/internal/model/entity/member_info.go new file mode 100644 index 0000000..15b3e7c --- /dev/null +++ b/internal/model/entity/member_info.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// MemberInfo is the golang structure for table member_info. +type MemberInfo struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + Nickname string `json:"nickname" orm:"nickname" description:""` // + Img string `json:"img" orm:"img" description:""` // + Medal string `json:"medal" orm:"medal" description:"体验官勋章url"` // 体验官勋章url + LocMarket string `json:"locMarket" orm:"loc_market" description:""` // + Dept string `json:"dept" orm:"dept" description:""` // + Shop string `json:"shop" orm:"shop" description:""` // + BoguMember int `json:"boguMember" orm:"bogu_member" description:"1:博股会员,0:不是"` // 1:博股会员,0:不是 +} diff --git a/internal/model/entity/notice.go b/internal/model/entity/notice.go new file mode 100644 index 0000000..04f10f3 --- /dev/null +++ b/internal/model/entity/notice.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// Notice is the golang structure for table notice. +type Notice struct { + Id uint `json:"id" orm:"id" description:""` // + Type int `json:"type" orm:"type" description:"1进度修改2评论3点赞"` // 1进度修改2评论3点赞 + WishId int `json:"wishId" orm:"wish_id" description:"心愿ID"` // 心愿ID + CommentId int `json:"commentId" orm:"comment_id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:"操作人"` // 操作人 + NoticeJwcode int `json:"noticeJwcode" orm:"notice_jwcode" description:"通知人"` // 通知人 + State int `json:"state" orm:"state" description:"0新通知1已看"` // 0新通知1已看 + WishState int `json:"wishState" orm:"wish_state" description:"把心愿改成的状态"` // 把心愿改成的状态 + CreatedAt int `json:"createdAt" orm:"created_at" description:""` // +} diff --git a/internal/model/entity/product.go b/internal/model/entity/product.go new file mode 100644 index 0000000..427486a --- /dev/null +++ b/internal/model/entity/product.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// Product is the golang structure for table product. +type Product struct { + Id uint `json:"id" orm:"id" description:""` // + Name string `json:"name" orm:"name" description:""` // + Enabled int `json:"enabled" orm:"enabled" description:""` // + ZhCN string `json:"zhCN" orm:"zh_CN" description:""` // +} diff --git a/internal/model/entity/subject.go b/internal/model/entity/subject.go new file mode 100644 index 0000000..b180da9 --- /dev/null +++ b/internal/model/entity/subject.go @@ -0,0 +1,12 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// Subject is the golang structure for table subject. +type Subject struct { + Id uint `json:"id" orm:"id" description:""` // + Type int `json:"type" orm:"type" description:""` // + Content string `json:"content" orm:"content" description:""` // +} diff --git a/internal/model/entity/support.go b/internal/model/entity/support.go new file mode 100644 index 0000000..95369e9 --- /dev/null +++ b/internal/model/entity/support.go @@ -0,0 +1,14 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// Support is the golang structure for table support. +type Support struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:"用户标识"` // 用户标识 + WishId int `json:"wishId" orm:"wish_id" description:"心愿ID"` // 心愿ID + Type int `json:"type" orm:"type" description:"1支持2反对"` // 1支持2反对 + CreatedAt int `json:"createdAt" orm:"created_at" description:"时间"` // 时间 +} diff --git a/internal/model/entity/transaction_lecturer_records.go b/internal/model/entity/transaction_lecturer_records.go new file mode 100644 index 0000000..d54ac91 --- /dev/null +++ b/internal/model/entity/transaction_lecturer_records.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// TransactionLecturerRecords is the golang structure for table transaction_lecturer_records. +type TransactionLecturerRecords struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode string `json:"jwcode" orm:"jwcode" description:""` // + LecturerJwcode string `json:"lecturerJwcode" orm:"lecturer_jwcode" description:""` // + Time int `json:"time" orm:"time" description:""` // +} diff --git a/internal/model/entity/transaction_plan_files.go b/internal/model/entity/transaction_plan_files.go new file mode 100644 index 0000000..7663596 --- /dev/null +++ b/internal/model/entity/transaction_plan_files.go @@ -0,0 +1,14 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// TransactionPlanFiles is the golang structure for table transaction_plan_files. +type TransactionPlanFiles struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + Content string `json:"content" orm:"content" description:""` // + Time int `json:"time" orm:"time" description:"提交时间"` // 提交时间 + EncryptionId string `json:"encryptionId" orm:"encryption_id" description:""` // +} diff --git a/internal/model/entity/vote_1_indicators.go b/internal/model/entity/vote_1_indicators.go new file mode 100644 index 0000000..4a3c4ef --- /dev/null +++ b/internal/model/entity/vote_1_indicators.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// Vote1Indicators is the golang structure for table vote1_indicators. +type Vote1Indicators struct { + Id uint `json:"id" orm:"id" description:""` // + Title string `json:"title" orm:"title" description:""` // + Description string `json:"description" orm:"description" description:""` // + Img string `json:"img" orm:"img" description:""` // +} diff --git a/internal/model/entity/vote_1_records.go b/internal/model/entity/vote_1_records.go new file mode 100644 index 0000000..759e38f --- /dev/null +++ b/internal/model/entity/vote_1_records.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// Vote1Records is the golang structure for table vote1_records. +type Vote1Records struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode string `json:"jwcode" orm:"jwcode" description:""` // + VId int `json:"vId" orm:"v_id" description:""` // + VoteDate *gtime.Time `json:"voteDate" orm:"vote_date" description:""` // + Time int `json:"time" orm:"time" description:""` // +} diff --git a/internal/model/entity/vote_1_virtual_records.go b/internal/model/entity/vote_1_virtual_records.go new file mode 100644 index 0000000..9436c4f --- /dev/null +++ b/internal/model/entity/vote_1_virtual_records.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// Vote1VirtualRecords is the golang structure for table vote1_virtual_records. +type Vote1VirtualRecords struct { + Id uint `json:"id" orm:"id" description:""` // + VId int `json:"vId" orm:"v_id" description:""` // + Votes int `json:"votes" orm:"votes" description:""` // + VoteDate *gtime.Time `json:"voteDate" orm:"vote_date" description:""` // + Time int `json:"time" orm:"time" description:""` // +} diff --git a/internal/model/entity/vote_indicators.go b/internal/model/entity/vote_indicators.go new file mode 100644 index 0000000..c051a22 --- /dev/null +++ b/internal/model/entity/vote_indicators.go @@ -0,0 +1,12 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// VoteIndicators is the golang structure for table vote_indicators. +type VoteIndicators struct { + Id uint `json:"id" orm:"id" description:""` // + Title string `json:"title" orm:"title" description:""` // + Num int `json:"num" orm:"num" description:"选择人数"` // 选择人数 +} diff --git a/internal/model/entity/vote_records.go b/internal/model/entity/vote_records.go new file mode 100644 index 0000000..ba48bf3 --- /dev/null +++ b/internal/model/entity/vote_records.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// VoteRecords is the golang structure for table vote_records. +type VoteRecords struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode string `json:"jwcode" orm:"jwcode" description:""` // + VoteDate *gtime.Time `json:"voteDate" orm:"vote_date" description:""` // + Time int `json:"time" orm:"time" description:""` // + OptionsTitle string `json:"optionsTitle" orm:"options_title" description:""` // +} diff --git a/internal/model/entity/wish.go b/internal/model/entity/wish.go new file mode 100644 index 0000000..3012e66 --- /dev/null +++ b/internal/model/entity/wish.go @@ -0,0 +1,39 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// Wish is the golang structure for table wish. +type Wish struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:"用户标识"` // 用户标识 + Title string `json:"title" orm:"title" description:"心愿名称"` // 心愿名称 + Content string `json:"content" orm:"content" description:"心愿内容"` // 心愿内容 + Image string `json:"image" orm:"image" description:"图片,多张图片用json格式保存"` // 图片,多张图片用json格式保存 + Type int `json:"type" orm:"type" description:"1精网2弘历软件3大财神4锦囊5L-2产品"` // 1精网2弘历软件3大财神4锦囊5L-2产品 + Status int `json:"status" orm:"status" description:"0隐藏1待处理2排期中3在开发4已上线"` // 0隐藏1待处理2排期中3在开发4已上线 + Support int `json:"support" orm:"support" description:"点赞数"` // 点赞数 + Opposition int `json:"opposition" orm:"opposition" description:"反对数"` // 反对数 + Comment int `json:"comment" orm:"comment" description:"评论数"` // 评论数 + Fee float64 `json:"fee" orm:"fee" description:"打赏当午券数"` // 打赏当午券数 + FeeNum int `json:"feeNum" orm:"fee_num" description:"打赏人数"` // 打赏人数 + Vote int `json:"vote" orm:"vote" description:"总票数"` // 总票数 + Zan int `json:"zan" orm:"zan" description:"点赞数"` // 点赞数 + See int `json:"see" orm:"see" description:"观看数"` // 观看数 + Class int `json:"class" orm:"class" description:"1心愿2公告"` // 1心愿2公告 + Label uint `json:"label" orm:"label" description:"1软件bug2产品需求3市场建议"` // 1软件bug2产品需求3市场建议 + Delete int `json:"delete" orm:"delete" description:"0正常1删除2隐藏"` // 0正常1删除2隐藏 + ManagerJwcode int `json:"managerJwcode" orm:"manager_jwcode" description:"负责人的jwcode"` // 负责人的jwcode + Order uint `json:"order" orm:"order" description:"排序"` // 排序 + Coding int `json:"coding" orm:"coding" description:"是否经过开发"` // 是否经过开发 + DeadLine *gtime.Time `json:"deadLine" orm:"dead_line" description:"上线日期"` // 上线日期 + Language string `json:"language" orm:"language" description:""` // + SubjectId int `json:"subjectId" orm:"subject_id" description:"话题ID"` // 话题ID + CreatedAt int `json:"createdAt" orm:"created_at" description:""` // + UpdatedAt int `json:"updatedAt" orm:"updated_at" description:""` // +} diff --git a/internal/model/entity/wish_cost.go b/internal/model/entity/wish_cost.go new file mode 100644 index 0000000..b9ec66a --- /dev/null +++ b/internal/model/entity/wish_cost.go @@ -0,0 +1,16 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// WishCost is the golang structure for table wish_cost. +type WishCost struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + WishId int `json:"wishId" orm:"wish_id" description:""` // + Coin float64 `json:"coin" orm:"coin" description:""` // + Status int `json:"status" orm:"status" description:"1新建2成功3未成功"` // 1新建2成功3未成功 + Msg string `json:"msg" orm:"msg" description:""` // + CreatedAt int `json:"createdAt" orm:"created_at" description:""` // +} diff --git a/internal/model/entity/wish_related.go b/internal/model/entity/wish_related.go new file mode 100644 index 0000000..50dd86b --- /dev/null +++ b/internal/model/entity/wish_related.go @@ -0,0 +1,12 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// WishRelated is the golang structure for table wish_related. +type WishRelated struct { + Id uint `json:"id" orm:"id" description:""` // + WishId int `json:"wishId" orm:"wish_id" description:"心愿ID"` // 心愿ID + NoticeId int `json:"noticeId" orm:"notice_id" description:"公告ID"` // 公告ID +} diff --git a/internal/model/entity/wish_state.go b/internal/model/entity/wish_state.go new file mode 100644 index 0000000..6c6442b --- /dev/null +++ b/internal/model/entity/wish_state.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// WishState is the golang structure for table wish_state. +type WishState struct { + Id uint `json:"id" orm:"id" description:""` // + Language string `json:"language" orm:"language" description:""` // + Type int `json:"type" orm:"type" description:""` // + Name string `json:"name" orm:"name" description:""` // +} diff --git a/internal/model/entity/wish_translate.go b/internal/model/entity/wish_translate.go new file mode 100644 index 0000000..b3a6dd3 --- /dev/null +++ b/internal/model/entity/wish_translate.go @@ -0,0 +1,15 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// WishTranslate is the golang structure for table wish_translate. +type WishTranslate struct { + Id uint `json:"id" orm:"id" description:""` // + WishId int `json:"wishId" orm:"wish_id" description:""` // + SourceLanguage string `json:"sourceLanguage" orm:"source_language" description:""` // + TargetLanguage string `json:"targetLanguage" orm:"target_language" description:""` // + Title string `json:"title" orm:"title" description:""` // + Content string `json:"content" orm:"content" description:""` // +} diff --git a/internal/model/entity/wish_zan.go b/internal/model/entity/wish_zan.go new file mode 100644 index 0000000..542ccfc --- /dev/null +++ b/internal/model/entity/wish_zan.go @@ -0,0 +1,13 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// WishZan is the golang structure for table wish_zan. +type WishZan struct { + Id uint `json:"id" orm:"id" description:""` // + Jwcode int `json:"jwcode" orm:"jwcode" description:""` // + WishId int `json:"wishId" orm:"wish_id" description:""` // + CreatedAt string `json:"createdAt" orm:"created_at" description:""` // +} diff --git a/internal/packed/packed.go b/internal/packed/packed.go new file mode 100644 index 0000000..e20ab1e --- /dev/null +++ b/internal/packed/packed.go @@ -0,0 +1 @@ +package packed diff --git a/internal/service/.gitkeep b/internal/service/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/main.go b/main.go new file mode 100644 index 0000000..b79b367 --- /dev/null +++ b/main.go @@ -0,0 +1,13 @@ +package main + +import ( + _ "VoteManage_Go/internal/packed" + + "github.com/gogf/gf/v2/os/gctx" + + "VoteManage_Go/internal/cmd" +) + +func main() { + cmd.Main.Run(gctx.GetInitCtx()) +} diff --git a/manifest/deploy/kustomize/base/deployment.yaml b/manifest/deploy/kustomize/base/deployment.yaml new file mode 100644 index 0000000..28f1d69 --- /dev/null +++ b/manifest/deploy/kustomize/base/deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: template-single + labels: + app: template-single +spec: + replicas: 1 + selector: + matchLabels: + app: template-single + template: + metadata: + labels: + app: template-single + spec: + containers: + - name : main + image: template-single + imagePullPolicy: Always + diff --git a/manifest/deploy/kustomize/base/kustomization.yaml b/manifest/deploy/kustomize/base/kustomization.yaml new file mode 100644 index 0000000..302d92d --- /dev/null +++ b/manifest/deploy/kustomize/base/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- deployment.yaml +- service.yaml + + + diff --git a/manifest/deploy/kustomize/base/service.yaml b/manifest/deploy/kustomize/base/service.yaml new file mode 100644 index 0000000..608771c --- /dev/null +++ b/manifest/deploy/kustomize/base/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: template-single +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 8000 + selector: + app: template-single + diff --git a/manifest/deploy/kustomize/overlays/develop/configmap.yaml b/manifest/deploy/kustomize/overlays/develop/configmap.yaml new file mode 100644 index 0000000..3b1d0af --- /dev/null +++ b/manifest/deploy/kustomize/overlays/develop/configmap.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: template-single-configmap +data: + config.yaml: | + server: + address: ":8000" + openapiPath: "/api.json" + swaggerPath: "/swagger" + + logger: + level : "all" + stdout: true diff --git a/manifest/deploy/kustomize/overlays/develop/deployment.yaml b/manifest/deploy/kustomize/overlays/develop/deployment.yaml new file mode 100644 index 0000000..04e4851 --- /dev/null +++ b/manifest/deploy/kustomize/overlays/develop/deployment.yaml @@ -0,0 +1,10 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: template-single +spec: + template: + spec: + containers: + - name : main + image: template-single:develop \ No newline at end of file diff --git a/manifest/deploy/kustomize/overlays/develop/kustomization.yaml b/manifest/deploy/kustomize/overlays/develop/kustomization.yaml new file mode 100644 index 0000000..4731c47 --- /dev/null +++ b/manifest/deploy/kustomize/overlays/develop/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ../../base +- configmap.yaml + +patchesStrategicMerge: +- deployment.yaml + +namespace: default + + + diff --git a/manifest/docker/Dockerfile b/manifest/docker/Dockerfile new file mode 100644 index 0000000..d3abe8f --- /dev/null +++ b/manifest/docker/Dockerfile @@ -0,0 +1,16 @@ +FROM loads/alpine:3.8 + +############################################################################### +# INSTALLATION +############################################################################### + +ENV WORKDIR /app +ADD resource $WORKDIR/ +ADD ./temp/linux_amd64/main $WORKDIR/main +RUN chmod +x $WORKDIR/main + +############################################################################### +# START +############################################################################### +WORKDIR $WORKDIR +CMD ./main diff --git a/manifest/docker/docker.sh b/manifest/docker/docker.sh new file mode 100644 index 0000000..ff393f9 --- /dev/null +++ b/manifest/docker/docker.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# This shell is executed before docker build. + + + + + diff --git a/manifest/i18n/.gitkeep b/manifest/i18n/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/manifest/protobuf/.keep-if-necessary b/manifest/protobuf/.keep-if-necessary new file mode 100644 index 0000000..e69de29 diff --git a/resource/public/html/.gitkeep b/resource/public/html/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/resource/public/plugin/.gitkeep b/resource/public/plugin/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/resource/public/resource/css/.gitkeep b/resource/public/resource/css/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/resource/public/resource/image/.gitkeep b/resource/public/resource/image/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/resource/public/resource/js/.gitkeep b/resource/public/resource/js/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/resource/template/.gitkeep b/resource/template/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/utility/.gitkeep b/utility/.gitkeep new file mode 100644 index 0000000..e69de29