12 changed files with 473 additions and 0 deletions
-
27internal/dao/float_window.go
-
91internal/dao/internal/float_window.go
-
89internal/dao/internal/member_info.go
-
83internal/dao/internal/vote_records.go
-
27internal/dao/member_info.go
-
27internal/dao/vote_records.go
-
25internal/model/do/float_window.go
-
23internal/model/do/member_info.go
-
21internal/model/do/vote_records.go
-
23internal/model/entity/float_window.go
-
18internal/model/entity/member_info.go
-
19internal/model/entity/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" |
||||
|
) |
||||
|
|
||||
|
// internalFloatWindowDao is internal type for wrapping internal DAO implements.
|
||||
|
type internalFloatWindowDao = *internal.FloatWindowDao |
||||
|
|
||||
|
// floatWindowDao is the data access object for table float_window.
|
||||
|
// You can define custom methods on it to extend its functionality as you wish.
|
||||
|
type floatWindowDao struct { |
||||
|
internalFloatWindowDao |
||||
|
} |
||||
|
|
||||
|
var ( |
||||
|
// FloatWindow is globally public accessible object for table float_window operations.
|
||||
|
FloatWindow = floatWindowDao{ |
||||
|
internal.NewFloatWindowDao(), |
||||
|
} |
||||
|
) |
||||
|
|
||||
|
// Fill with you ideas below.
|
@ -0,0 +1,91 @@ |
|||||
|
// ==========================================================================
|
||||
|
// 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" |
||||
|
) |
||||
|
|
||||
|
// FloatWindowDao is the data access object for table float_window.
|
||||
|
type FloatWindowDao 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 FloatWindowColumns // columns contains all the column names of Table for convenient usage.
|
||||
|
} |
||||
|
|
||||
|
// FloatWindowColumns defines and stores column names for table float_window.
|
||||
|
type FloatWindowColumns struct { |
||||
|
Id string // 自增id
|
||||
|
Title string // 标题
|
||||
|
Icon string // 图标
|
||||
|
Start string // 开始日期
|
||||
|
End string // 结束日期
|
||||
|
Url string // 活动地址
|
||||
|
Markets string // 市场 my,sg,th,vi,can,hk
|
||||
|
MemberLimit string // 用户权限 1:非网 2:半年版 3:终免
|
||||
|
CreatedAt string //
|
||||
|
UpdatedAt string //
|
||||
|
} |
||||
|
|
||||
|
// floatWindowColumns holds the columns for table float_window.
|
||||
|
var floatWindowColumns = FloatWindowColumns{ |
||||
|
Id: "id", |
||||
|
Title: "title", |
||||
|
Icon: "icon", |
||||
|
Start: "start", |
||||
|
End: "end", |
||||
|
Url: "url", |
||||
|
Markets: "markets", |
||||
|
MemberLimit: "member_limit", |
||||
|
CreatedAt: "created_at", |
||||
|
UpdatedAt: "updated_at", |
||||
|
} |
||||
|
|
||||
|
// NewFloatWindowDao creates and returns a new DAO object for table data access.
|
||||
|
func NewFloatWindowDao() *FloatWindowDao { |
||||
|
return &FloatWindowDao{ |
||||
|
group: "default", |
||||
|
table: "float_window", |
||||
|
columns: floatWindowColumns, |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
|
func (dao *FloatWindowDao) DB() gdb.DB { |
||||
|
return g.DB(dao.group) |
||||
|
} |
||||
|
|
||||
|
// Table returns the table name of current dao.
|
||||
|
func (dao *FloatWindowDao) Table() string { |
||||
|
return dao.table |
||||
|
} |
||||
|
|
||||
|
// Columns returns all column names of current dao.
|
||||
|
func (dao *FloatWindowDao) Columns() FloatWindowColumns { |
||||
|
return dao.columns |
||||
|
} |
||||
|
|
||||
|
// Group returns the configuration group name of database of current dao.
|
||||
|
func (dao *FloatWindowDao) Group() string { |
||||
|
return dao.group |
||||
|
} |
||||
|
|
||||
|
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
|
func (dao *FloatWindowDao) 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 *FloatWindowDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { |
||||
|
return dao.Ctx(ctx).Transaction(ctx, f) |
||||
|
} |
@ -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) |
||||
|
} |
@ -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" |
||||
|
) |
||||
|
|
||||
|
// 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 //
|
||||
|
ActivityId string // 活动id
|
||||
|
} |
||||
|
|
||||
|
// voteRecordsColumns holds the columns for table vote_records.
|
||||
|
var voteRecordsColumns = VoteRecordsColumns{ |
||||
|
Id: "id", |
||||
|
Jwcode: "jwcode", |
||||
|
VoteDate: "vote_date", |
||||
|
Time: "time", |
||||
|
OptionsTitle: "options_title", |
||||
|
ActivityId: "activity_id", |
||||
|
} |
||||
|
|
||||
|
// 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) |
||||
|
} |
@ -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.
|
@ -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.
|
@ -0,0 +1,25 @@ |
|||||
|
// =================================================================================
|
||||
|
// 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" |
||||
|
) |
||||
|
|
||||
|
// FloatWindow is the golang structure of table float_window for DAO operations like Where/Data.
|
||||
|
type FloatWindow struct { |
||||
|
g.Meta `orm:"table:float_window, do:true"` |
||||
|
Id interface{} // 自增id
|
||||
|
Title interface{} // 标题
|
||||
|
Icon interface{} // 图标
|
||||
|
Start *gtime.Time // 开始日期
|
||||
|
End *gtime.Time // 结束日期
|
||||
|
Url interface{} // 活动地址
|
||||
|
Markets interface{} // 市场 my,sg,th,vi,can,hk
|
||||
|
MemberLimit interface{} // 用户权限 1:非网 2:半年版 3:终免
|
||||
|
CreatedAt *gtime.Time //
|
||||
|
UpdatedAt *gtime.Time //
|
||||
|
} |
@ -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:不是
|
||||
|
} |
@ -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" |
||||
|
"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{} //
|
||||
|
ActivityId interface{} // 活动id
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
// =================================================================================
|
||||
|
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
|
// =================================================================================
|
||||
|
|
||||
|
package entity |
||||
|
|
||||
|
import ( |
||||
|
"github.com/gogf/gf/v2/os/gtime" |
||||
|
) |
||||
|
|
||||
|
// FloatWindow is the golang structure for table float_window.
|
||||
|
type FloatWindow struct { |
||||
|
Id int `json:"id" orm:"id" description:"自增id"` // 自增id
|
||||
|
Title string `json:"title" orm:"title" description:"标题"` // 标题
|
||||
|
Icon string `json:"icon" orm:"icon" description:"图标"` // 图标
|
||||
|
Start *gtime.Time `json:"start" orm:"start" description:"开始日期"` // 开始日期
|
||||
|
End *gtime.Time `json:"end" orm:"end" description:"结束日期"` // 结束日期
|
||||
|
Url string `json:"url" orm:"url" description:"活动地址"` // 活动地址
|
||||
|
Markets string `json:"markets" orm:"markets" description:"市场 my,sg,th,vi,can,hk"` // 市场 my,sg,th,vi,can,hk
|
||||
|
MemberLimit string `json:"memberLimit" orm:"member_limit" description:"用户权限 1:非网 2:半年版 3:终免"` // 用户权限 1:非网 2:半年版 3:终免
|
||||
|
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:""` //
|
||||
|
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:""` //
|
||||
|
} |
@ -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:不是
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
// =================================================================================
|
||||
|
// 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:""` //
|
||||
|
ActivityId int `json:"activityId" orm:"activity_id" description:"活动id"` // 活动id
|
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue