调整表结构

This commit is contained in:
2025-06-05 14:58:58 +08:00
parent fdf5152bd2
commit 77067adf33
83 changed files with 137 additions and 2662 deletions

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalCompetitionAwardsDao is an internal type for wrapping the internal DAO implementation.
type internalCompetitionAwardsDao = *internal.CompetitionAwardsDao
// competitionAwardsDao is the data access object for the table competition_awards.
// You can define custom methods on it to extend its functionality as needed.
type competitionAwardsDao struct {
internalCompetitionAwardsDao
}
var (
// CompetitionAwards is a globally accessible object for table competition_awards operations.
CompetitionAwards = competitionAwardsDao{
internal.NewCompetitionAwardsDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalCompetitionParticipantsDao is an internal type for wrapping the internal DAO implementation.
type internalCompetitionParticipantsDao = *internal.CompetitionParticipantsDao
// competitionParticipantsDao is the data access object for the table competition_participants.
// You can define custom methods on it to extend its functionality as needed.
type competitionParticipantsDao struct {
internalCompetitionParticipantsDao
}
var (
// CompetitionParticipants is a globally accessible object for table competition_participants operations.
CompetitionParticipants = competitionParticipantsDao{
internal.NewCompetitionParticipantsDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalCompetitionsDao is an internal type for wrapping the internal DAO implementation.
type internalCompetitionsDao = *internal.CompetitionsDao
// competitionsDao is the data access object for the table competitions.
// You can define custom methods on it to extend its functionality as needed.
type competitionsDao struct {
internalCompetitionsDao
}
var (
// Competitions is a globally accessible object for table competitions operations.
Competitions = competitionsDao{
internal.NewCompetitionsDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,93 +0,0 @@
// ==========================================================================
// 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"
)
// CompetitionAwardsDao is the data access object for the table competition_awards.
type CompetitionAwardsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns CompetitionAwardsColumns // columns contains all the column names of Table for convenient usage.
}
// CompetitionAwardsColumns defines and stores column names for the table competition_awards.
type CompetitionAwardsColumns struct {
Id string // 赛事获奖ID
CompetitionId string // 赛事ID
UserId string // 获奖用户ID
AwardRank string // 获奖名次1:冠军2:亚军3:季军,依次类推)
RewardType string // 奖励类型1=平台奖励2=门店奖励
RewardId string // 对应奖励ID
Amount string // 奖励数量
IssuedAt string // 奖励发放时间
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间
}
// competitionAwardsColumns holds the columns for the table competition_awards.
var competitionAwardsColumns = CompetitionAwardsColumns{
Id: "id",
CompetitionId: "competition_id",
UserId: "user_id",
AwardRank: "award_rank",
RewardType: "reward_type",
RewardId: "reward_id",
Amount: "amount",
IssuedAt: "issued_at",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewCompetitionAwardsDao creates and returns a new DAO object for table data access.
func NewCompetitionAwardsDao() *CompetitionAwardsDao {
return &CompetitionAwardsDao{
group: "default",
table: "competition_awards",
columns: competitionAwardsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *CompetitionAwardsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *CompetitionAwardsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *CompetitionAwardsDao) Columns() CompetitionAwardsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *CompetitionAwardsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *CompetitionAwardsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *CompetitionAwardsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,87 +0,0 @@
// ==========================================================================
// 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"
)
// CompetitionParticipantsDao is the data access object for the table competition_participants.
type CompetitionParticipantsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns CompetitionParticipantsColumns // columns contains all the column names of Table for convenient usage.
}
// CompetitionParticipantsColumns defines and stores column names for the table competition_participants.
type CompetitionParticipantsColumns struct {
Id string // 参赛记录ID
CompetitionId string // 赛事ID
UserId string // 参赛用户ID
RegistrationTime string // 报名时间
Status string // 参赛状态1=已报名2=已取消3=已禁赛
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间
}
// competitionParticipantsColumns holds the columns for the table competition_participants.
var competitionParticipantsColumns = CompetitionParticipantsColumns{
Id: "id",
CompetitionId: "competition_id",
UserId: "user_id",
RegistrationTime: "registration_time",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewCompetitionParticipantsDao creates and returns a new DAO object for table data access.
func NewCompetitionParticipantsDao() *CompetitionParticipantsDao {
return &CompetitionParticipantsDao{
group: "default",
table: "competition_participants",
columns: competitionParticipantsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *CompetitionParticipantsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *CompetitionParticipantsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *CompetitionParticipantsDao) Columns() CompetitionParticipantsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *CompetitionParticipantsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *CompetitionParticipantsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *CompetitionParticipantsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,99 +0,0 @@
// ==========================================================================
// 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"
)
// CompetitionsDao is the data access object for the table competitions.
type CompetitionsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns CompetitionsColumns // columns contains all the column names of Table for convenient usage.
}
// CompetitionsColumns defines and stores column names for the table competitions.
type CompetitionsColumns struct {
Id string // 赛事唯一标识符
Name string // 赛事名称
Description string // 赛事描述
GameMode string // 游戏模式
Conditions string // 赛事条件
Rules string // 赛事规则说明
StartTime string // 赛事开始时间
EndTime string // 赛事结束时间
IsActive string // 赛事是否启用
MerchantId string // 所属商户ID
StoreId string // 所属门店ID
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// competitionsColumns holds the columns for the table competitions.
var competitionsColumns = CompetitionsColumns{
Id: "id",
Name: "name",
Description: "description",
GameMode: "game_mode",
Conditions: "conditions",
Rules: "rules",
StartTime: "start_time",
EndTime: "end_time",
IsActive: "is_active",
MerchantId: "merchant_id",
StoreId: "store_id",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewCompetitionsDao creates and returns a new DAO object for table data access.
func NewCompetitionsDao() *CompetitionsDao {
return &CompetitionsDao{
group: "default",
table: "competitions",
columns: competitionsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *CompetitionsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *CompetitionsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *CompetitionsDao) Columns() CompetitionsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *CompetitionsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *CompetitionsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *CompetitionsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,97 +0,0 @@
// ==========================================================================
// 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"
)
// MenusDao is the data access object for the table menus.
type MenusDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns MenusColumns // columns contains all the column names of Table for convenient usage.
}
// MenusColumns defines and stores column names for the table menus.
type MenusColumns struct {
Id string // 菜单ID
ParentId string // 父级菜单ID
Name string // 菜单名称
Path string // 前端路由路径
Component string // 前端组件路径
Type string // 类型1=目录父级菜单2=菜单(功能页面)
Icon string // 图标
Sort string // 排序
Hidden string // 是否隐藏0=显示1=隐藏
Status string // 状态1=启用2=禁用
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// menusColumns holds the columns for the table menus.
var menusColumns = MenusColumns{
Id: "id",
ParentId: "parent_id",
Name: "name",
Path: "path",
Component: "component",
Type: "type",
Icon: "icon",
Sort: "sort",
Hidden: "hidden",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewMenusDao creates and returns a new DAO object for table data access.
func NewMenusDao() *MenusDao {
return &MenusDao{
group: "default",
table: "menus",
columns: menusColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *MenusDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *MenusDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *MenusDao) Columns() MenusColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *MenusDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *MenusDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *MenusDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,93 +0,0 @@
// ==========================================================================
// 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"
)
// NoticesDao is the data access object for the table notices.
type NoticesDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns NoticesColumns // columns contains all the column names of Table for convenient usage.
}
// NoticesColumns defines and stores column names for the table notices.
type NoticesColumns struct {
Id string // 通知ID
Title string // 通知标题
Content string // 通知内容
Type string // 通知类型1=系统公告2=活动通知3=维护通知
Status string // 状态0=关闭1=发布
VisibleTo string // 可见范围1=所有人2=仅门店3=仅用户
MerchantId string // 所属商户ID
StoreId string // 所属门店ID
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// noticesColumns holds the columns for the table notices.
var noticesColumns = NoticesColumns{
Id: "id",
Title: "title",
Content: "content",
Type: "type",
Status: "status",
VisibleTo: "visible_to",
MerchantId: "merchant_id",
StoreId: "store_id",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewNoticesDao creates and returns a new DAO object for table data access.
func NewNoticesDao() *NoticesDao {
return &NoticesDao{
group: "default",
table: "notices",
columns: noticesColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *NoticesDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *NoticesDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *NoticesDao) Columns() NoticesColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *NoticesDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *NoticesDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *NoticesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,97 +0,0 @@
// ==========================================================================
// 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"
)
// RewardDistributionsDao is the data access object for the table reward_distributions.
type RewardDistributionsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns RewardDistributionsColumns // columns contains all the column names of Table for convenient usage.
}
// RewardDistributionsColumns defines and stores column names for the table reward_distributions.
type RewardDistributionsColumns struct {
Id string // 奖励下发记录ID
UserId string // 接收奖励的用户ID
TaskId string // 触发该奖励的任务ID
RewardId string // 奖励ID
RewardSource string // 奖励来源1=平台2=门店
Amount string // 奖励数量
StoreId string // 所属门店ID
Status string // 发放状态0=待发放1=已发放2=失败
IssuedAt string // 实际发放时间
Remark string // 备注信息
CreatedAt string // 记录创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// rewardDistributionsColumns holds the columns for the table reward_distributions.
var rewardDistributionsColumns = RewardDistributionsColumns{
Id: "id",
UserId: "user_id",
TaskId: "task_id",
RewardId: "reward_id",
RewardSource: "reward_source",
Amount: "amount",
StoreId: "store_id",
Status: "status",
IssuedAt: "issued_at",
Remark: "remark",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewRewardDistributionsDao creates and returns a new DAO object for table data access.
func NewRewardDistributionsDao() *RewardDistributionsDao {
return &RewardDistributionsDao{
group: "default",
table: "reward_distributions",
columns: rewardDistributionsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *RewardDistributionsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *RewardDistributionsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *RewardDistributionsDao) Columns() RewardDistributionsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *RewardDistributionsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *RewardDistributionsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *RewardDistributionsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,83 +0,0 @@
// ==========================================================================
// 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"
)
// RoleMenusDao is the data access object for the table role_menus.
type RoleMenusDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns RoleMenusColumns // columns contains all the column names of Table for convenient usage.
}
// RoleMenusColumns defines and stores column names for the table role_menus.
type RoleMenusColumns struct {
Id string // ID
RoleId string // 角色ID
MenuId string // 菜单ID
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// roleMenusColumns holds the columns for the table role_menus.
var roleMenusColumns = RoleMenusColumns{
Id: "id",
RoleId: "role_id",
MenuId: "menu_id",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewRoleMenusDao creates and returns a new DAO object for table data access.
func NewRoleMenusDao() *RoleMenusDao {
return &RoleMenusDao{
group: "default",
table: "role_menus",
columns: roleMenusColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *RoleMenusDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *RoleMenusDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *RoleMenusDao) Columns() RoleMenusColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *RoleMenusDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *RoleMenusDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *RoleMenusDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,91 +0,0 @@
// ==========================================================================
// 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"
)
// StoreRewardsDao is the data access object for the table store_rewards.
type StoreRewardsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns StoreRewardsColumns // columns contains all the column names of Table for convenient usage.
}
// StoreRewardsColumns defines and stores column names for the table store_rewards.
type StoreRewardsColumns struct {
Id string // 门店奖励ID
StoreId string // 所属门店ID
RewardTypeId string // 奖励类型ID
RewardName string // 奖励名称
Amount string // 奖励数量
Total string // 该奖励总库存NULL 表示无限)
MerchantId string // 所属商户ID
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// storeRewardsColumns holds the columns for the table store_rewards.
var storeRewardsColumns = StoreRewardsColumns{
Id: "id",
StoreId: "store_id",
RewardTypeId: "reward_type_id",
RewardName: "reward_name",
Amount: "amount",
Total: "total",
MerchantId: "merchant_id",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewStoreRewardsDao creates and returns a new DAO object for table data access.
func NewStoreRewardsDao() *StoreRewardsDao {
return &StoreRewardsDao{
group: "default",
table: "store_rewards",
columns: storeRewardsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *StoreRewardsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *StoreRewardsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *StoreRewardsDao) Columns() StoreRewardsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *StoreRewardsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *StoreRewardsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *StoreRewardsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,87 +0,0 @@
// ==========================================================================
// 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"
)
// StoreTaskRewardsDao is the data access object for the table store_task_rewards.
type StoreTaskRewardsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns StoreTaskRewardsColumns // columns contains all the column names of Table for convenient usage.
}
// StoreTaskRewardsColumns defines and stores column names for the table store_task_rewards.
type StoreTaskRewardsColumns struct {
Id string // 门店奖励记录ID
StoreId string // 门店ID
TaskId string // 任务ID
StoreRewardId string // 门店奖励ID
IsEnabled string // 是否启用
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// storeTaskRewardsColumns holds the columns for the table store_task_rewards.
var storeTaskRewardsColumns = StoreTaskRewardsColumns{
Id: "id",
StoreId: "store_id",
TaskId: "task_id",
StoreRewardId: "store_reward_id",
IsEnabled: "is_enabled",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewStoreTaskRewardsDao creates and returns a new DAO object for table data access.
func NewStoreTaskRewardsDao() *StoreTaskRewardsDao {
return &StoreTaskRewardsDao{
group: "default",
table: "store_task_rewards",
columns: storeTaskRewardsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *StoreTaskRewardsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *StoreTaskRewardsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *StoreTaskRewardsDao) Columns() StoreTaskRewardsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *StoreTaskRewardsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *StoreTaskRewardsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *StoreTaskRewardsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,111 +0,0 @@
// ==========================================================================
// 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"
)
// SystemOperationLogsDao is the data access object for the table system_operation_logs.
type SystemOperationLogsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns SystemOperationLogsColumns // columns contains all the column names of Table for convenient usage.
}
// SystemOperationLogsColumns defines and stores column names for the table system_operation_logs.
type SystemOperationLogsColumns struct {
Id string // 日志ID
OperatorType string // 操作者类型1=系统管理员2=商户管理员3=门店管理员4=普通用户
OperatorId string // 操作者ID
MerchantId string // 所属商户ID
StoreId string // 所属门店ID
Module string // 操作模块
Action string // 操作类型
TargetType string // 操作对象类型
TargetId string // 操作对象ID
Content string // 操作内容描述
RequestMethod string // 请求方法
RequestUrl string // 请求URL
RequestParams string // 请求参数
ResponseCode string // 响应状态码
ResponseMessage string // 响应信息
IpAddress string // 操作IP地址
UserAgent string // 用户代理信息
CreatedAt string // 操作时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// systemOperationLogsColumns holds the columns for the table system_operation_logs.
var systemOperationLogsColumns = SystemOperationLogsColumns{
Id: "id",
OperatorType: "operator_type",
OperatorId: "operator_id",
MerchantId: "merchant_id",
StoreId: "store_id",
Module: "module",
Action: "action",
TargetType: "target_type",
TargetId: "target_id",
Content: "content",
RequestMethod: "request_method",
RequestUrl: "request_url",
RequestParams: "request_params",
ResponseCode: "response_code",
ResponseMessage: "response_message",
IpAddress: "ip_address",
UserAgent: "user_agent",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewSystemOperationLogsDao creates and returns a new DAO object for table data access.
func NewSystemOperationLogsDao() *SystemOperationLogsDao {
return &SystemOperationLogsDao{
group: "default",
table: "system_operation_logs",
columns: systemOperationLogsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *SystemOperationLogsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *SystemOperationLogsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *SystemOperationLogsDao) Columns() SystemOperationLogsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *SystemOperationLogsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *SystemOperationLogsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *SystemOperationLogsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,81 +0,0 @@
// ==========================================================================
// 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"
)
// TasksDao is the data access object for the table tasks.
type TasksDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns TasksColumns // columns contains all the column names of Table for convenient usage.
}
// TasksColumns defines and stores column names for the table tasks.
type TasksColumns struct {
Id string // 任务ID
QqTaskId string // QQ网吧任务ID
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// tasksColumns holds the columns for the table tasks.
var tasksColumns = TasksColumns{
Id: "id",
QqTaskId: "qq_task_id",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewTasksDao creates and returns a new DAO object for table data access.
func NewTasksDao() *TasksDao {
return &TasksDao{
group: "default",
table: "tasks",
columns: tasksColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *TasksDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *TasksDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *TasksDao) Columns() TasksColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *TasksDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *TasksDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *TasksDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,93 +0,0 @@
// ==========================================================================
// 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"
)
// UserLoginRecordsDao is the data access object for the table user_login_records.
type UserLoginRecordsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns UserLoginRecordsColumns // columns contains all the column names of Table for convenient usage.
}
// UserLoginRecordsColumns defines and stores column names for the table user_login_records.
type UserLoginRecordsColumns struct {
Id string // 记录ID
UserId string // 用户ID
StoreId string // 登录门店ID
LoginIp string // 登录IP地址
LoginPlatform string // 登录平台1=PC
LoginType string // 登录方式1=微信2=手机号3=账号密码4=其他
LoginStatus string // 登录状态1=成功2=失败
FailReason string // 失败原因
CreatedAt string // 登录时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
}
// userLoginRecordsColumns holds the columns for the table user_login_records.
var userLoginRecordsColumns = UserLoginRecordsColumns{
Id: "id",
UserId: "user_id",
StoreId: "store_id",
LoginIp: "login_ip",
LoginPlatform: "login_platform",
LoginType: "login_type",
LoginStatus: "login_status",
FailReason: "fail_reason",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewUserLoginRecordsDao creates and returns a new DAO object for table data access.
func NewUserLoginRecordsDao() *UserLoginRecordsDao {
return &UserLoginRecordsDao{
group: "default",
table: "user_login_records",
columns: userLoginRecordsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *UserLoginRecordsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *UserLoginRecordsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *UserLoginRecordsDao) Columns() UserLoginRecordsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *UserLoginRecordsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *UserLoginRecordsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *UserLoginRecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,91 +0,0 @@
// ==========================================================================
// 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"
)
// UserTaskRecordsDao is the data access object for the table user_task_records.
type UserTaskRecordsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of the current DAO.
columns UserTaskRecordsColumns // columns contains all the column names of Table for convenient usage.
}
// UserTaskRecordsColumns defines and stores column names for the table user_task_records.
type UserTaskRecordsColumns struct {
Id string // 任务记录ID
UserId string // 用户ID
TaskId string // 任务ID
Status string // 任务状态1=未开始2=进行中3=已完成4=已领取奖励
Progress string // 任务进度
FinishedAt string // 完成时间
RewardReceivedAt string // 领取奖励时间
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间
}
// userTaskRecordsColumns holds the columns for the table user_task_records.
var userTaskRecordsColumns = UserTaskRecordsColumns{
Id: "id",
UserId: "user_id",
TaskId: "task_id",
Status: "status",
Progress: "progress",
FinishedAt: "finished_at",
RewardReceivedAt: "reward_received_at",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewUserTaskRecordsDao creates and returns a new DAO object for table data access.
func NewUserTaskRecordsDao() *UserTaskRecordsDao {
return &UserTaskRecordsDao{
group: "default",
table: "user_task_records",
columns: userTaskRecordsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *UserTaskRecordsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *UserTaskRecordsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *UserTaskRecordsDao) Columns() UserTaskRecordsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *UserTaskRecordsDao) Group() string {
return dao.group
}
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *UserTaskRecordsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rolls back the transaction and returns the error if function f returns a non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note: Do not commit or roll back the transaction in function f,
// as it is automatically handled by this function.
func (dao *UserTaskRecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalMenusDao is an internal type for wrapping the internal DAO implementation.
type internalMenusDao = *internal.MenusDao
// menusDao is the data access object for the table menus.
// You can define custom methods on it to extend its functionality as needed.
type menusDao struct {
internalMenusDao
}
var (
// Menus is a globally accessible object for table menus operations.
Menus = menusDao{
internal.NewMenusDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalNoticesDao is an internal type for wrapping the internal DAO implementation.
type internalNoticesDao = *internal.NoticesDao
// noticesDao is the data access object for the table notices.
// You can define custom methods on it to extend its functionality as needed.
type noticesDao struct {
internalNoticesDao
}
var (
// Notices is a globally accessible object for table notices operations.
Notices = noticesDao{
internal.NewNoticesDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalRewardDistributionsDao is an internal type for wrapping the internal DAO implementation.
type internalRewardDistributionsDao = *internal.RewardDistributionsDao
// rewardDistributionsDao is the data access object for the table reward_distributions.
// You can define custom methods on it to extend its functionality as needed.
type rewardDistributionsDao struct {
internalRewardDistributionsDao
}
var (
// RewardDistributions is a globally accessible object for table reward_distributions operations.
RewardDistributions = rewardDistributionsDao{
internal.NewRewardDistributionsDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalRoleMenusDao is an internal type for wrapping the internal DAO implementation.
type internalRoleMenusDao = *internal.RoleMenusDao
// roleMenusDao is the data access object for the table role_menus.
// You can define custom methods on it to extend its functionality as needed.
type roleMenusDao struct {
internalRoleMenusDao
}
var (
// RoleMenus is a globally accessible object for table role_menus operations.
RoleMenus = roleMenusDao{
internal.NewRoleMenusDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalStoreRewardsDao is an internal type for wrapping the internal DAO implementation.
type internalStoreRewardsDao = *internal.StoreRewardsDao
// storeRewardsDao is the data access object for the table store_rewards.
// You can define custom methods on it to extend its functionality as needed.
type storeRewardsDao struct {
internalStoreRewardsDao
}
var (
// StoreRewards is a globally accessible object for table store_rewards operations.
StoreRewards = storeRewardsDao{
internal.NewStoreRewardsDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalStoreTaskRewardsDao is an internal type for wrapping the internal DAO implementation.
type internalStoreTaskRewardsDao = *internal.StoreTaskRewardsDao
// storeTaskRewardsDao is the data access object for the table store_task_rewards.
// You can define custom methods on it to extend its functionality as needed.
type storeTaskRewardsDao struct {
internalStoreTaskRewardsDao
}
var (
// StoreTaskRewards is a globally accessible object for table store_task_rewards operations.
StoreTaskRewards = storeTaskRewardsDao{
internal.NewStoreTaskRewardsDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalSystemOperationLogsDao is an internal type for wrapping the internal DAO implementation.
type internalSystemOperationLogsDao = *internal.SystemOperationLogsDao
// systemOperationLogsDao is the data access object for the table system_operation_logs.
// You can define custom methods on it to extend its functionality as needed.
type systemOperationLogsDao struct {
internalSystemOperationLogsDao
}
var (
// SystemOperationLogs is a globally accessible object for table system_operation_logs operations.
SystemOperationLogs = systemOperationLogsDao{
internal.NewSystemOperationLogsDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalTasksDao is an internal type for wrapping the internal DAO implementation.
type internalTasksDao = *internal.TasksDao
// tasksDao is the data access object for the table tasks.
// You can define custom methods on it to extend its functionality as needed.
type tasksDao struct {
internalTasksDao
}
var (
// Tasks is a globally accessible object for table tasks operations.
Tasks = tasksDao{
internal.NewTasksDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalUserLoginRecordsDao is an internal type for wrapping the internal DAO implementation.
type internalUserLoginRecordsDao = *internal.UserLoginRecordsDao
// userLoginRecordsDao is the data access object for the table user_login_records.
// You can define custom methods on it to extend its functionality as needed.
type userLoginRecordsDao struct {
internalUserLoginRecordsDao
}
var (
// UserLoginRecords is a globally accessible object for table user_login_records operations.
UserLoginRecords = userLoginRecordsDao{
internal.NewUserLoginRecordsDao(),
}
)
// Add your custom methods and functionality below.

View File

@ -1,27 +0,0 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// internalUserTaskRecordsDao is an internal type for wrapping the internal DAO implementation.
type internalUserTaskRecordsDao = *internal.UserTaskRecordsDao
// userTaskRecordsDao is the data access object for the table user_task_records.
// You can define custom methods on it to extend its functionality as needed.
type userTaskRecordsDao struct {
internalUserTaskRecordsDao
}
var (
// UserTaskRecords is a globally accessible object for table user_task_records operations.
UserTaskRecords = userTaskRecordsDao{
internal.NewUserTaskRecordsDao(),
}
)
// Add your custom methods and functionality below.