88 lines
2.4 KiB
Plaintext
88 lines
2.4 KiB
Plaintext
classDiagram
|
|
class StoreInfo {
|
|
+String orgId
|
|
+String name
|
|
+String address
|
|
+String contactPhone
|
|
+String activationCode
|
|
+int status
|
|
+DateTime? expireTime
|
|
+DateTime? createTime
|
|
<<新增>>
|
|
+String? themeId
|
|
+String? splashUrl
|
|
+String? logoUrl
|
|
+String? provinceCode
|
|
+String? cityCode
|
|
+String? districtCode
|
|
+String? addressDetail
|
|
+StoreInfo.fromJson(Map)
|
|
+Map toJson()
|
|
+String get regionText()
|
|
}
|
|
|
|
class RegionNode {
|
|
+String code
|
|
+String name
|
|
+List~RegionNode~ sub
|
|
+RegionNode.fromJson(Map)
|
|
}
|
|
|
|
class StoreTheme {
|
|
<<enum>>
|
|
classic
|
|
ocean
|
|
forest
|
|
sunset
|
|
mono
|
|
+String get id
|
|
+String get label
|
|
+Color get primary
|
|
}
|
|
|
|
class StoreThemePresets {
|
|
<<const>>
|
|
+List~StoreTheme~ all
|
|
+StoreTheme? byId(String)
|
|
}
|
|
|
|
class RegionData {
|
|
-List~RegionNode~ _tree
|
|
+Future~void~ load()
|
|
+List~RegionNode~ get provinces
|
|
+List~RegionNode~ citiesOf(String)
|
|
+List~RegionNode~ districtsOf(String,String)
|
|
+String nameOf(String)
|
|
+String tryMapAddress(String)~List~String?~
|
|
}
|
|
|
|
class StoreLocalCache {
|
|
+Future~void~ saveTheme(String orgId, String themeId)
|
|
+Future~String?~ getTheme(String orgId)
|
|
+Future~void~ saveBranding(String orgId, String splashUrl, String logoUrl)
|
|
+Future~Map?~ getBranding(String orgId)
|
|
+Future~void~ saveRegion(String orgId, String p, String c, String d, String detail)
|
|
}
|
|
|
|
class OrgService {
|
|
+Future~void~ saveStore(Map) // TODO 对接 POST /sys/store/save
|
|
+Future~void~ updateStore(Map) // TODO 对接 POST /sys/store/update
|
|
+Future~void~ setStoreTheme(String,String) // TODO POST /sys/store/theme
|
|
+Future~void~ setStoreBranding(String,String,String) // TODO POST /sys/store/branding
|
|
}
|
|
|
|
class DeviceService {
|
|
+Future~void~ bindDeviceByScan(String scanPayload, String storeId, String? groupId) // TODO POST /device/bind
|
|
}
|
|
|
|
class DeviceScanPage {
|
|
+String mode // 'query' | 'bind'
|
|
+String? storeId
|
|
+String? groupId
|
|
}
|
|
|
|
StoreInfo "1" *-- "1" StoreTheme : themeId 关联
|
|
RegionData "1" *-- "0..*" RegionNode : 树
|
|
OrgService ..> StoreInfo : 读写
|
|
DeviceService ..> DeviceScanPage : 扫码结果
|