package bootstrap import ( "github.com/break/junhong_cmp_fiber/internal/store/postgres" ) // stores 封装所有 Store 实例 // 注意:此结构体不导出,仅在 bootstrap 包内部使用 type stores struct { Account *postgres.AccountStore Shop *postgres.ShopStore Role *postgres.RoleStore Permission *postgres.PermissionStore AccountRole *postgres.AccountRoleStore RolePermission *postgres.RolePermissionStore PersonalCustomer *postgres.PersonalCustomerStore PersonalCustomerPhone *postgres.PersonalCustomerPhoneStore // TODO: 新增 Store 在此添加字段 } // initStores 初始化所有 Store 实例 func initStores(deps *Dependencies) *stores { return &stores{ Account: postgres.NewAccountStore(deps.DB, deps.Redis), Shop: postgres.NewShopStore(deps.DB, deps.Redis), Role: postgres.NewRoleStore(deps.DB), Permission: postgres.NewPermissionStore(deps.DB), AccountRole: postgres.NewAccountRoleStore(deps.DB, deps.Redis), RolePermission: postgres.NewRolePermissionStore(deps.DB, deps.Redis), PersonalCustomer: postgres.NewPersonalCustomerStore(deps.DB, deps.Redis), PersonalCustomerPhone: postgres.NewPersonalCustomerPhoneStore(deps.DB), // TODO: 新增 Store 在此初始化 } }