M3-deploy.yaml
3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# M3 服务与数据库部署映射 (v2.1:新增 EmployeeAggregate→t_employee_main、AuditOrder API 与订单审核列映射)
# 领域实体 -> 物理表/字段映射;引擎据此自动建表并生成动态SQL,前端无硬编码URL。
deploymentMappings:
globalConfig:
dbEngine: mysql8
defaultSchema: trade_db
idGen: snowflake
aggregateMappingList:
- aggregateId: CustomerAggregate
serviceName: customer-service
commandApi:
CreateCustomer: /api/v1/customer/create
ModifyCustomerInfo: /api/v1/customer/modify
tableMappings:
- domainEntity: Customer
table: t_customer_main
pk: customer_id
fieldMap:
customerId: customer_id
customerName: cust_name
contactPhone: phone
registerTime: register_time
customerLevel: cust_level
- aggregateId: ProductAggregate
serviceName: product-service
commandApi:
CreateProduct: /api/v1/product/create
ModifyProductPrice: /api/v1/product/price
StockDeduct: /api/v1/product/stock/deduct
tableMappings:
- domainEntity: Product
table: t_product_main
pk: product_id
fieldMap:
productId: product_id
productName: prod_name
skuCode: sku_code
category: category
saleCurrency: currency
salePrice: sale_price
stockNum: stock_num
isOnSale: is_on_sale
- aggregateId: OrderAggregate
serviceName: order-service
commandApi:
CreateOrder: /api/v1/order/create
ModifyOrderDeliveryAddress: /api/v1/order/addr
CancelOrder: /api/v1/order/cancel
AuditOrder: /api/v1/order/audit
tableMappings:
- domainEntity: Order
table: t_order_main
pk: order_id
fieldMap:
orderId: order_id
createTime: create_time
totalCurrency: total_currency
totalAmount: total_amt
customerId: cust_id
orderStatus: order_status
auditorId: auditor_id
auditorName: auditor_name
auditTime: audit_time
auditRemark: audit_remark
- domainEntity: OrderItem
table: t_order_item
pk: item_id
fieldMap:
itemId: item_id
productId: product_id
quantity: buy_qty
itemCurrency: item_currency
itemPrice: item_price
- domainEntity: PaymentTerm
table: t_order_payment_term
pk: term_id
fieldMap:
termId: term_id
paymentType: pay_type
dueDays: due_days
depositRatio: deposit_ratio
settleCurrency: settle_currency
settleAmount: settle_amt
- domainEntity: DeliveryAddressEntity
table: t_order_address
pk: addr_id
fieldMap:
addrId: addr_id
province: province
city: city
district: district
streetDetail: street
receiverName: receiver_name
receiverPhone: receiver_phone
- aggregateId: EmployeeAggregate
serviceName: employee-service
commandApi:
CreateEmployee: /api/v1/employee/create
ModifyEmployee: /api/v1/employee/modify
tableMappings:
- domainEntity: Employee
table: t_employee_main
pk: employee_id
fieldMap:
employeeId: employee_id
employeeName: emp_name
department: dept
auditApproveCount: approve_count
auditRejectCount: reject_count
remark: remark
lastAuditTime: last_audit_time