|
|
@@ -22,19 +22,20 @@ import { MerchantMt } from '@d8d/merchant-module-mt'
|
|
|
import { OrderMt, OrderGoodsMt, OrderRefundMt } from '@d8d/orders-module-mt'
|
|
|
import { SupplierMt } from '@d8d/supplier-module-mt'
|
|
|
|
|
|
+initializeDataSource([
|
|
|
+ // 已实现的包实体
|
|
|
+ UserEntityMt, RoleMt, FileMt,
|
|
|
+ TenantEntityMt,
|
|
|
+ AreaEntityMt, PaymentMtEntity,
|
|
|
+ Advertisement, AdvertisementType,
|
|
|
+ DeliveryAddressMt,
|
|
|
+ GoodsMt, GoodsCategoryMt,
|
|
|
+ MerchantMt,
|
|
|
+ OrderMt, OrderGoodsMt, OrderRefundMt,
|
|
|
+ SupplierMt, SystemConfigMt
|
|
|
+])
|
|
|
+
|
|
|
if(!AppDataSource || !AppDataSource.isInitialized ) {
|
|
|
- initializeDataSource([
|
|
|
- // 已实现的包实体
|
|
|
- UserEntityMt, RoleMt, FileMt,
|
|
|
- TenantEntityMt,
|
|
|
- AreaEntityMt, PaymentMtEntity,
|
|
|
- Advertisement, AdvertisementType,
|
|
|
- DeliveryAddressMt,
|
|
|
- GoodsMt, GoodsCategoryMt,
|
|
|
- MerchantMt,
|
|
|
- OrderMt, OrderGoodsMt, OrderRefundMt,
|
|
|
- SupplierMt, SystemConfigMt
|
|
|
- ])
|
|
|
await AppDataSource.initialize();
|
|
|
console.log('数据库初始化完成')
|
|
|
}
|