生成门店 service 层代码

This commit is contained in:
2025-06-05 10:15:00 +08:00
parent 7faad8b3c4
commit a9dabbbe21
5 changed files with 130 additions and 5 deletions

View File

@ -5,4 +5,32 @@
package service
type ()
import (
"context"
"server/internal/model"
)
type (
IStore interface {
List(ctx context.Context, in *model.StoreListIn) (out *model.StoreListOut, err error)
Create(ctx context.Context, in *model.StoreCreateIn) (out *model.CreateOut, err error)
Update(ctx context.Context, in *model.StoreUpdateIn) (out *model.UpdateOut, err error)
Delete(ctx context.Context, in *model.StoreDeleteIn) (out *model.DeleteOut, err error)
Info(ctx context.Context, in *model.StoreInfoIn) (out *model.StoreInfoOut, err error)
}
)
var (
localStore IStore
)
func Store() IStore {
if localStore == nil {
panic("implement not found for interface IStore, forgot register?")
}
return localStore
}
func RegisterStore(i IStore) {
localStore = i
}