diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..6cdf255 --- /dev/null +++ b/build.bat @@ -0,0 +1,3 @@ +set GOARCH=amd64 +set GOOS=linux +go build -o ./bin/gm_server main.go \ No newline at end of file diff --git a/internal/dao/game_bug.go b/internal/dao/game_bug.go new file mode 100644 index 0000000..050c4d9 --- /dev/null +++ b/internal/dao/game_bug.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "tyj_admin/internal/dao/internal" +) + +// internalGameBugDao is internal type for wrapping internal DAO implements. +type internalGameBugDao = *internal.GameBugDao + +// gameBugDao is the data access object for table game_bug. +// You can define custom methods on it to extend its functionality as you wish. +type gameBugDao struct { + internalGameBugDao +} + +var ( + // GameBug is globally public accessible object for table game_bug operations. + GameBug = gameBugDao{ + internal.NewGameBugDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/game_notice.go b/internal/dao/game_notice.go new file mode 100644 index 0000000..f73b2dd --- /dev/null +++ b/internal/dao/game_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 ( + "tyj_admin/internal/dao/internal" +) + +// internalGameNoticeDao is internal type for wrapping internal DAO implements. +type internalGameNoticeDao = *internal.GameNoticeDao + +// gameNoticeDao is the data access object for table game_notice. +// You can define custom methods on it to extend its functionality as you wish. +type gameNoticeDao struct { + internalGameNoticeDao +} + +var ( + // GameNotice is globally public accessible object for table game_notice operations. + GameNotice = gameNoticeDao{ + internal.NewGameNoticeDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/internal/game_bug.go b/internal/dao/internal/game_bug.go new file mode 100644 index 0000000..edb28c3 --- /dev/null +++ b/internal/dao/internal/game_bug.go @@ -0,0 +1,89 @@ +// ========================================================================== +// Code generated 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" +) + +// GameBugDao is the data access object for table game_bug. +type GameBugDao 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 GameBugColumns // columns contains all the column names of Table for convenient usage. +} + +// GameBugColumns defines and stores column names for table game_bug. +type GameBugColumns struct { + Id string // 索引ID + Uid string // 桃谷id + Server string // 区服 + Qq string // qq号 + Tel string // 手机号 + Bug string // bug详情 + OccurrenceTime string // 发生时间 + CreateTime string // 创建时间 + State string // 0表示没处理,1表示已处理 +} + +// gameBugColumns holds the columns for table game_bug. +var gameBugColumns = GameBugColumns{ + Id: "id", + Uid: "uid", + Server: "server", + Qq: "qq", + Tel: "tel", + Bug: "bug", + OccurrenceTime: "occurrenceTime", + CreateTime: "createTime", + State: "state", +} + +// NewGameBugDao creates and returns a new DAO object for table data access. +func NewGameBugDao() *GameBugDao { + return &GameBugDao{ + group: "default", + table: "game_bug", + columns: gameBugColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *GameBugDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *GameBugDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *GameBugDao) Columns() GameBugColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *GameBugDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *GameBugDao) 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 *GameBugDao) 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/game_notice.go b/internal/dao/internal/game_notice.go new file mode 100644 index 0000000..aa1708d --- /dev/null +++ b/internal/dao/internal/game_notice.go @@ -0,0 +1,81 @@ +// ========================================================================== +// Code generated 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" +) + +// GameNoticeDao is the data access object for table game_notice. +type GameNoticeDao 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 GameNoticeColumns // columns contains all the column names of Table for convenient usage. +} + +// GameNoticeColumns defines and stores column names for table game_notice. +type GameNoticeColumns struct { + Id string // 索引ID + NoticeType string // 公告类型:1表示维护公告,2表示登录公告 + Channel string // 渠道号:第三方的登录渠道 + Content string // + Status string // 1.正常,2.白名单,3.维护 +} + +// gameNoticeColumns holds the columns for table game_notice. +var gameNoticeColumns = GameNoticeColumns{ + Id: "id", + NoticeType: "notice_type", + Channel: "channel", + Content: "content", + Status: "status", +} + +// NewGameNoticeDao creates and returns a new DAO object for table data access. +func NewGameNoticeDao() *GameNoticeDao { + return &GameNoticeDao{ + group: "default", + table: "game_notice", + columns: gameNoticeColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *GameNoticeDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *GameNoticeDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *GameNoticeDao) Columns() GameNoticeColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *GameNoticeDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *GameNoticeDao) 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 *GameNoticeDao) 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/model/do/game_bug.go b/internal/model/do/game_bug.go new file mode 100644 index 0000000..164ba8d --- /dev/null +++ b/internal/model/do/game_bug.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// GameBug is the golang structure of table game_bug for DAO operations like Where/Data. +type GameBug struct { + g.Meta `orm:"table:game_bug, do:true"` + Id interface{} // 索引ID + Uid interface{} // 桃谷id + Server interface{} // 区服 + Qq interface{} // qq号 + Tel interface{} // 手机号 + Bug interface{} // bug详情 + OccurrenceTime interface{} // 发生时间 + CreateTime interface{} // 创建时间 + State interface{} // 0表示没处理,1表示已处理 +} diff --git a/internal/model/do/game_notice.go b/internal/model/do/game_notice.go new file mode 100644 index 0000000..2f75da6 --- /dev/null +++ b/internal/model/do/game_notice.go @@ -0,0 +1,19 @@ +// ================================================================================= +// Code generated by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// GameNotice is the golang structure of table game_notice for DAO operations like Where/Data. +type GameNotice struct { + g.Meta `orm:"table:game_notice, do:true"` + Id interface{} // 索引ID + NoticeType interface{} // 公告类型:1表示维护公告,2表示登录公告 + Channel interface{} // 渠道号:第三方的登录渠道 + Content interface{} // + Status interface{} // 1.正常,2.白名单,3.维护 +} diff --git a/internal/model/entity/game_bug.go b/internal/model/entity/game_bug.go new file mode 100644 index 0000000..b46ad8d --- /dev/null +++ b/internal/model/entity/game_bug.go @@ -0,0 +1,18 @@ +// ================================================================================= +// Code generated by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// GameBug is the golang structure for table game_bug. +type GameBug struct { + Id uint `json:"id" description:"索引ID"` + Uid int `json:"uid" description:"桃谷id"` + Server int `json:"server" description:"区服"` + Qq string `json:"qq" description:"qq号"` + Tel int `json:"tel" description:"手机号"` + Bug string `json:"bug" description:"bug详情"` + OccurrenceTime int64 `json:"occurrenceTime" description:"发生时间"` + CreateTime int64 `json:"createTime" description:"创建时间"` + State int `json:"state" description:"0表示没处理,1表示已处理"` +} diff --git a/internal/model/entity/game_notice.go b/internal/model/entity/game_notice.go new file mode 100644 index 0000000..f772ab4 --- /dev/null +++ b/internal/model/entity/game_notice.go @@ -0,0 +1,14 @@ +// ================================================================================= +// Code generated by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// GameNotice is the golang structure for table game_notice. +type GameNotice struct { + Id int `json:"id" description:"索引ID"` + NoticeType uint `json:"noticeType" description:"公告类型:1表示维护公告,2表示登录公告"` + Channel string `json:"channel" description:"渠道号:第三方的登录渠道"` + Content string `json:"content" description:""` + Status int `json:"status" description:"1.正常,2.白名单,3.维护"` +}