实现门店桌面设置相关配置

This commit is contained in:
2025-06-19 18:01:47 +08:00
parent fcdc44b94e
commit a25068154f
35 changed files with 372 additions and 335 deletions

View File

@ -6,19 +6,12 @@ package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// StoreDesktopSettings is the golang structure of table store_desktop_settings for DAO operations like Where/Data.
type StoreDesktopSettings struct {
g.Meta `orm:"table:store_desktop_settings, do:true"`
Id interface{} // 主键ID
StoreId interface{} // 门店ID
BackgroundUrl interface{} // 桌面背景图片URL
Resolution interface{} // 分辨率例如1920x1080
IsTopWidgetVisible interface{} // 顶部组件是否显示FALSE=隐藏TRUE=显示
IsRightWidgetVisible interface{} // 右侧组件是否显示FALSE=隐藏TRUE=显示
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 软删除时间戳
g.Meta `orm:"table:store_desktop_settings, do:true"`
StoreId interface{} //
TopComponentVisible interface{} // 1显示2 隐藏
RightComponentVisible interface{} // 1显示2 隐藏
}

View File

@ -4,19 +4,9 @@
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// StoreDesktopSettings is the golang structure for table store_desktop_settings.
type StoreDesktopSettings struct {
Id int64 `json:"id" orm:"id" description:"主键ID"` // 主键ID
StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID"` // 门店ID
BackgroundUrl string `json:"backgroundUrl" orm:"background_url" description:"桌面背景图片URL"` // 桌面背景图片URL
Resolution string `json:"resolution" orm:"resolution" description:"分辨率例如1920x1080"` // 分辨率例如1920x1080
IsTopWidgetVisible int `json:"isTopWidgetVisible" orm:"is_top_widget_visible" description:"顶部组件是否显示FALSE=隐藏TRUE=显示"` // 顶部组件是否显示FALSE=隐藏TRUE=显示
IsRightWidgetVisible int `json:"isRightWidgetVisible" orm:"is_right_widget_visible" description:"右侧组件是否显示FALSE=隐藏TRUE=显示"` // 右侧组件是否显示FALSE=隐藏TRUE=显示
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:"软删除时间戳"` // 软删除时间戳
StoreId int64 `json:"storeId" orm:"store_id" description:""` //
TopComponentVisible int `json:"topComponentVisible" orm:"top_component_visible" description:"1显示2 隐藏"` // 1显示2 隐藏
RightComponentVisible int `json:"rightComponentVisible" orm:"right_component_visible" description:"1显示2 隐藏"` // 1显示2 隐藏
}

View File

@ -3,13 +3,10 @@ package model
import "github.com/gogf/gf/v2/frame/g"
type StoreDesktopSettings struct {
g.Meta `orm:"table:store_desktop_settings"`
Id int64 `orm:"id" json:"id"` // 主键ID
StoreId int64 `orm:"store_id" json:"store_id"` // 门店ID
BackgroundUrl string `orm:"background_url" json:"background_url"` // 桌面背景图片URL
Resolution string `orm:"resolution" json:"resolution"` // 分辨率例如1920x1080
IsTopWidgetVisible bool `orm:"is_top_widget_visible" json:"is_top_widget_visible"` // 顶部组件是否显示FALSE=隐藏TRUE=显示
IsRightWidgetVisible bool `orm:"is_right_widget_visible" json:"is_right_widget_visible"` // 右侧组件是否显示FALSE=隐藏TRUE=显示
g.Meta `orm:"table:store_desktop_settings"`
StoreId int64 `json:"storeId" orm:"store_id" description:""` //
TopComponentVisible int `json:"topComponentVisible" orm:"top_component_visible" description:"1显示2 隐藏"` // 1显示2 隐藏
RightComponentVisible int `json:"rightComponentVisible" orm:"right_component_visible" description:"1显示2 隐藏"` // 1显示2 隐藏
}
type StoreGetDesktopSettingIn struct {
@ -22,13 +19,10 @@ type StoreGetDesktopSettingOut struct {
}
type SaveDesktopSettingIn struct {
Id int64
StoreId int64
BackgroundUrl string
Resolution string
IsTopWidgetVisible bool
IsRightWidgetVisible bool
StoreId int64
TopComponentVisible int // 1显示2 隐藏
RightComponentVisible int // 1显示2 隐藏
}
type SaveDesktopSettingOut struct {
Id int64
Success bool
}