实现了门店奖励的增删改查

This commit is contained in:
2025-06-17 18:11:27 +08:00
parent 427e70f94e
commit e21353df23
23 changed files with 659 additions and 42 deletions

View File

@ -15,7 +15,7 @@ type RewardTypes struct {
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=禁用
Status int `json:"status" orm:"status" description:"状态1=正常,2=禁用"` // 状态1=正常,2=禁用
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:"软删除时间戳"` // 软删除时间戳

View File

@ -16,8 +16,8 @@ type Rewards struct {
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=禁用
Value uint64 `json:"value" orm:"value" description:"奖励值(如积分数额、优惠金额)"` // 奖励值(如积分数额、优惠金额)
Status int `json:"status" orm:"status" description:"状态1=正常,2=禁用"` // 状态1=正常,2=禁用
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:"软删除时间戳"` // 软删除时间戳

View File

@ -10,14 +10,14 @@ import (
// UserTasks is the golang structure for table user_tasks.
type UserTasks struct {
Id int64 `json:"id" orm:"id" description:"用户任务唯一标识符"` // 用户任务唯一标识符
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
TaskId int64 `json:"taskId" orm:"task_id" description:"任务ID"` // 任务ID
Status int `json:"status" orm:"status" description:"任务状态1=已领取2=进行中,3=已完成4=已取消"` // 任务状态1=已领取2=进行中,3=已完成4=已取消
SerialNumber string `json:"serialNumber" orm:"serial_number" description:"流水号,确保用户任务唯一性"` // 流水号,确保用户任务唯一性
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
CompletedAt *gtime.Time `json:"completedAt" orm:"completed_at" description:"任务完成时间"` // 任务完成时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
StoreId int64 `json:"storeId" orm:"store_id" description:"门店 id"` // 门店 id
Id int64 `json:"id" orm:"id" description:"用户任务唯一标识符"` // 用户任务唯一标识符
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
TaskId int64 `json:"taskId" orm:"task_id" description:"任务ID"` // 任务ID
Status int `json:"status" orm:"status" description:"任务状态1=进行中,2=已完成3=未完成"` // 任务状态1=进行中,2=已完成3=未完成
SerialNumber string `json:"serialNumber" orm:"serial_number" description:"流水号,确保用户任务唯一性"` // 流水号,确保用户任务唯一性
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
CompletedAt *gtime.Time `json:"completedAt" orm:"completed_at" description:"任务完成时间"` // 任务完成时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
StoreId int64 `json:"storeId" orm:"store_id" description:"门店 id"` // 门店 id
}