All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 5m16s
主要变更: - 新增 Carrier CRUD API(创建、列表、详情、更新、删除、状态更新) - IotCard/IotCardImportTask 添加 carrier_type/carrier_name 冗余字段 - 移除 Carrier 表的 channel_name/channel_code 字段 - 查询时直接使用冗余字段,避免 JOIN Carrier 表 - 添加数据库迁移脚本(000021-000023) - 添加单元测试和集成测试 - 同步更新 OpenAPI 文档和 specs
58 lines
3.2 KiB
Go
58 lines
3.2 KiB
Go
package bootstrap
|
|
|
|
import (
|
|
"github.com/break/junhong_cmp_fiber/internal/store/postgres"
|
|
)
|
|
|
|
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
|
|
Wallet *postgres.WalletStore
|
|
CommissionWithdrawalRequest *postgres.CommissionWithdrawalRequestStore
|
|
CommissionRecord *postgres.CommissionRecordStore
|
|
WalletTransaction *postgres.WalletTransactionStore
|
|
CommissionWithdrawalSetting *postgres.CommissionWithdrawalSettingStore
|
|
Enterprise *postgres.EnterpriseStore
|
|
EnterpriseCardAuthorization *postgres.EnterpriseCardAuthorizationStore
|
|
IotCard *postgres.IotCardStore
|
|
IotCardImportTask *postgres.IotCardImportTaskStore
|
|
Device *postgres.DeviceStore
|
|
DeviceSimBinding *postgres.DeviceSimBindingStore
|
|
DeviceImportTask *postgres.DeviceImportTaskStore
|
|
AssetAllocationRecord *postgres.AssetAllocationRecordStore
|
|
Carrier *postgres.CarrierStore
|
|
}
|
|
|
|
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),
|
|
Wallet: postgres.NewWalletStore(deps.DB, deps.Redis),
|
|
CommissionWithdrawalRequest: postgres.NewCommissionWithdrawalRequestStore(deps.DB, deps.Redis),
|
|
CommissionRecord: postgres.NewCommissionRecordStore(deps.DB, deps.Redis),
|
|
WalletTransaction: postgres.NewWalletTransactionStore(deps.DB, deps.Redis),
|
|
CommissionWithdrawalSetting: postgres.NewCommissionWithdrawalSettingStore(deps.DB, deps.Redis),
|
|
Enterprise: postgres.NewEnterpriseStore(deps.DB, deps.Redis),
|
|
EnterpriseCardAuthorization: postgres.NewEnterpriseCardAuthorizationStore(deps.DB, deps.Redis),
|
|
IotCard: postgres.NewIotCardStore(deps.DB, deps.Redis),
|
|
IotCardImportTask: postgres.NewIotCardImportTaskStore(deps.DB, deps.Redis),
|
|
Device: postgres.NewDeviceStore(deps.DB, deps.Redis),
|
|
DeviceSimBinding: postgres.NewDeviceSimBindingStore(deps.DB, deps.Redis),
|
|
DeviceImportTask: postgres.NewDeviceImportTaskStore(deps.DB, deps.Redis),
|
|
AssetAllocationRecord: postgres.NewAssetAllocationRecordStore(deps.DB, deps.Redis),
|
|
Carrier: postgres.NewCarrierStore(deps.DB),
|
|
}
|
|
}
|