Files
arenax-server/internal/model/store.go
2025-06-24 10:36:39 +08:00

113 lines
3.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
type Store struct {
g.Meta `orm:"table:stores"` // 绑定表名
Id int64 `json:"id" orm:"id,primary" dc:"门店ID"`
MerchantId int64 `json:"merchantId" orm:"merchant_id,not null" dc:"所属商户ID"`
Name string `json:"name" orm:"name,not null" dc:"门店名称"`
StoreCode string `json:"storeCode" orm:"store_code,unique" dc:"门店编号"`
Address string `json:"address" orm:"address" dc:"门店地址"`
ContactName string `json:"contactName" orm:"contact_name" dc:"联系人姓名"`
ContactPhone string `json:"contactPhone" orm:"contact_phone" dc:"联系人电话"`
Status int `json:"status" orm:"status,default:1" dc:"状态1=正常营业2=暂停营业3=已关闭"`
NetbarAccount string `json:"netbarAccount" orm:"netbar_account" dc:"网吧网关账号"`
}
type StoreIps struct {
Id int64 `json:"id" orm:"id" description:"主键ID"` // 主键ID
StoreId int64 `json:"storeId" orm:"store_id" description:"关联门店ID"` // 关联门店ID
IpAddress string `json:"ipAddress" orm:"ip_address" description:"IP地址支持IPv4或IPv6"` // IP地址支持IPv4或IPv6
Remark string `json:"remark" orm:"remark" description:"备注"` // 备注
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:"软删除时间戳"` // 软删除时间戳
}
type StoreCreateIn struct {
OperatorId int64
OperatorRole string
Name string // 门店名称
Address string // 门店地址
ContactName string // 联系人姓名
ContactPhone string // 联系人电话
}
type StoreUpdateIn struct {
OperatorId int64
OperatorRole string
Id int
Name string
Address string
ContactPhone string
ContactName string
Status int
}
type StoreListIn struct {
MerchantId int
Page int
Size int
Status int
}
type StoreListOut struct {
List []Store
Total int
}
type StoreInfoIn struct {
Id int
}
type StoreInfoOut struct {
}
type StoreDeleteIn struct {
Id int64
OperatorId int
OperatorRole string
}
type IPListIn struct {
StoreId int64 `json:"storeId" dc:"IP列表ID"`
Page int `json:"page"`
Size int `json:"size"`
}
type IPListout struct {
List interface{} `json:"list"`
Total int64 `json:"total"`
}
type IPUpdateIn struct {
Id int64 `json:"id" dc:"IP列表ID"`
Ip string `json:"ip" dc:"IP地址"`
StoreId int `json:"storeId" dc:"门店ID"`
Remark string `json:"remark" dc:"备注"`
}
type IPUpdateOut struct {
Success bool `json:"success"`
}
type IPDeleteIn struct {
Id int64
}
type IPDeleteOut struct {
Success bool `json:"success"`
}
type IPCreateIn struct {
Ip string `json:"ip" dc:"IP地址"`
StoreId int `json:"storeId" dc:"门店ID"`
Remark string `json:"remark" dc:"备注"`
}
type IPCreateOut struct {
Success bool `json:"success"`
}