实现奖励类型的增删改查
This commit is contained in:
24
internal/model/do/reward_types.go
Normal file
24
internal/model/do/reward_types.go
Normal file
@ -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"
|
||||
)
|
||||
|
||||
// RewardTypes is the golang structure of table reward_types for DAO operations like Where/Data.
|
||||
type RewardTypes struct {
|
||||
g.Meta `orm:"table:reward_types, do:true"`
|
||||
Id interface{} // 奖励类型ID
|
||||
Name interface{} // 奖励类型名称(如积分、优惠券)
|
||||
Description interface{} // 奖励类型描述
|
||||
Source interface{} // 来源:1=系统默认,2=门店自定义
|
||||
StoreId interface{} // 门店ID,系统默认类型为NULL
|
||||
Status interface{} // 状态:1=正常,0=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
26
internal/model/do/rewards.go
Normal file
26
internal/model/do/rewards.go
Normal file
@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// Rewards is the golang structure of table rewards for DAO operations like Where/Data.
|
||||
type Rewards struct {
|
||||
g.Meta `orm:"table:rewards, do:true"`
|
||||
Id interface{} // 奖励ID
|
||||
RewardTypeId interface{} // 奖励类型ID
|
||||
Name interface{} // 奖励名称(如100积分、5元优惠券)
|
||||
Description interface{} // 奖励描述
|
||||
Source interface{} // 来源:1=系统内置,2=门店自定义
|
||||
StoreId interface{} // 门店ID,系统内置奖励为NULL
|
||||
Value interface{} // 奖励值(如积分数额、优惠金额)
|
||||
Status interface{} // 状态:1=正常,0=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
24
internal/model/do/store_task_rewards.go
Normal file
24
internal/model/do/store_task_rewards.go
Normal file
@ -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"
|
||||
)
|
||||
|
||||
// StoreTaskRewards is the golang structure of table store_task_rewards for DAO operations like Where/Data.
|
||||
type StoreTaskRewards struct {
|
||||
g.Meta `orm:"table:store_task_rewards, do:true"`
|
||||
Id interface{} // 任务奖励关联ID
|
||||
TaskId interface{} // 门店任务ID
|
||||
RewardId interface{} // 奖励ID
|
||||
StoreId interface{} // 门店ID
|
||||
Quantity interface{} // 奖励数量(如发放多少个奖励)
|
||||
Status interface{} // 状态:1=正常,0=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
22
internal/model/entity/reward_types.go
Normal file
22
internal/model/entity/reward_types.go
Normal file
@ -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"
|
||||
)
|
||||
|
||||
// RewardTypes is the golang structure for table reward_types.
|
||||
type RewardTypes struct {
|
||||
Id int64 `json:"id" orm:"id" description:"奖励类型ID"` // 奖励类型ID
|
||||
Name string `json:"name" orm:"name" description:"奖励类型名称(如积分、优惠券)"` // 奖励类型名称(如积分、优惠券)
|
||||
Description string `json:"description" orm:"description" description:"奖励类型描述"` // 奖励类型描述
|
||||
Source int `json:"source" orm:"source" description:"来源:1=系统默认,2=门店自定义"` // 来源:1=系统默认,2=门店自定义
|
||||
StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID,系统默认类型为NULL"` // 门店ID,系统默认类型为NULL
|
||||
Status int `json:"status" orm:"status" description:"状态:1=正常,0=禁用"` // 状态:1=正常,0=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
24
internal/model/entity/rewards.go
Normal file
24
internal/model/entity/rewards.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Rewards is the golang structure for table rewards.
|
||||
type Rewards struct {
|
||||
Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID
|
||||
RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID"` // 奖励类型ID
|
||||
Name string `json:"name" orm:"name" description:"奖励名称(如100积分、5元优惠券)"` // 奖励名称(如100积分、5元优惠券)
|
||||
Description string `json:"description" orm:"description" description:"奖励描述"` // 奖励描述
|
||||
Source int `json:"source" orm:"source" description:"来源:1=系统内置,2=门店自定义"` // 来源:1=系统内置,2=门店自定义
|
||||
StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID,系统内置奖励为NULL"` // 门店ID,系统内置奖励为NULL
|
||||
Value float64 `json:"value" orm:"value" description:"奖励值(如积分数额、优惠金额)"` // 奖励值(如积分数额、优惠金额)
|
||||
Status int `json:"status" orm:"status" description:"状态:1=正常,0=禁用"` // 状态:1=正常,0=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
22
internal/model/entity/store_task_rewards.go
Normal file
22
internal/model/entity/store_task_rewards.go
Normal file
@ -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"
|
||||
)
|
||||
|
||||
// StoreTaskRewards is the golang structure for table store_task_rewards.
|
||||
type StoreTaskRewards struct {
|
||||
Id int64 `json:"id" orm:"id" description:"任务奖励关联ID"` // 任务奖励关联ID
|
||||
TaskId int64 `json:"taskId" orm:"task_id" description:"门店任务ID"` // 门店任务ID
|
||||
RewardId int64 `json:"rewardId" orm:"reward_id" description:"奖励ID"` // 奖励ID
|
||||
StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID"` // 门店ID
|
||||
Quantity int `json:"quantity" orm:"quantity" description:"奖励数量(如发放多少个奖励)"` // 奖励数量(如发放多少个奖励)
|
||||
Status int `json:"status" orm:"status" description:"状态:1=正常,0=禁用"` // 状态:1=正常,0=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
11
internal/model/reward.go
Normal file
11
internal/model/reward.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
type Reward struct {
|
||||
}
|
||||
|
||||
type RewardListIn struct {
|
||||
}
|
||||
type RewardListOut struct {
|
||||
List []Reward
|
||||
Total int
|
||||
}
|
||||
79
internal/model/rewardType.go
Normal file
79
internal/model/rewardType.go
Normal file
@ -0,0 +1,79 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// RewardType 奖励类型表
|
||||
type RewardType struct {
|
||||
Id int64 `json:"id" dc:"奖励类型ID" orm:"id,primary"`
|
||||
Name string `json:"name" dc:"奖励类型名称(如积分、优惠券)" orm:"name"`
|
||||
Description string `json:"description" dc:"奖励类型描述" orm:"description"`
|
||||
Source int `json:"source" dc:"来源:1=系统默认,2=门店自定义" orm:"source"`
|
||||
StoreId int64 `json:"storeId" dc:"门店ID,系统默认类型为NULL" orm:"store_id"`
|
||||
Status int `json:"status" dc:"状态:1=正常,2=禁用" orm:"status"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间" orm:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间" orm:"updated_at"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" dc:"软删除时间戳" orm:"deleted_at"`
|
||||
}
|
||||
|
||||
// RewardTypeCreateIn 创建奖励类型入参
|
||||
type RewardTypeCreateIn struct {
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
Name string
|
||||
Description string
|
||||
Source int
|
||||
StoreId int64
|
||||
Status int
|
||||
}
|
||||
|
||||
// RewardTypeCreateOut 创建奖励类型出参
|
||||
type RewardTypeCreateOut struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
// RewardTypeUpdateIn 更新奖励类型入参
|
||||
type RewardTypeUpdateIn struct {
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
Id int64
|
||||
Name string
|
||||
Description string
|
||||
StoreId int64
|
||||
Status int
|
||||
}
|
||||
|
||||
// RewardTypeUpdateOut 更新奖励类型出参
|
||||
type RewardTypeUpdateOut struct {
|
||||
Success bool
|
||||
}
|
||||
|
||||
// RewardTypeDeleteIn 删除奖励类型入参
|
||||
type RewardTypeDeleteIn struct {
|
||||
Id int64
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
}
|
||||
|
||||
// RewardTypeDeleteOut 删除奖励类型出参
|
||||
type RewardTypeDeleteOut struct {
|
||||
Success bool
|
||||
}
|
||||
|
||||
// RewardTypeListIn 获取奖励类型列表入参
|
||||
type RewardTypeListIn struct {
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
Page int
|
||||
Size int
|
||||
Name string
|
||||
StoreId int64
|
||||
Status int
|
||||
}
|
||||
|
||||
// RewardTypeListOut 获取奖励类型列表出参
|
||||
type RewardTypeListOut struct {
|
||||
List []RewardType
|
||||
Total int
|
||||
}
|
||||
Reference in New Issue
Block a user