Changeset 891 for trunk/Modules/Customer/Customer.php
- Timestamp:
- Dec 30, 2020, 11:52:07 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Customer/Customer.php
r890 r891 191 191 } 192 192 193 static function GetModels(): array 194 { 195 return array( 196 'Member', 197 'MemberPayment', 198 'SupportActivity', 199 'ServiceCategory', 200 'Service', 201 'ServiceCustomerRel', 202 ); 203 } 204 193 205 function DoInstall(): void 194 206 { 195 $this->InstallModel(Member::GetDesc()); 196 $this->InstallModel(MemberPayment::GetDesc()); 197 $this->InstallModel(SupportActivity::GetDesc()); 198 $this->InstallModel(ServiceCategory::GetDesc()); 199 $this->InstallModel(Service::GetDesc()); 200 $this->InstallModel(ServiceCustomerRel::GetDesc()); 207 foreach (self::GetModels() as $Model) 208 { 209 $this->InstallModel($Model::GetDesc()); 210 } 201 211 } 202 212 203 213 function Uninstall(): void 204 214 { 205 $this->UninstallModel(ServiceCustomerRel::GetDesc()); 206 $this->UninstallModel(Service::GetDesc()); 207 $this->UninstallModel(ServiceCategory::GetDesc()); 208 $this->UninstallModel(SupportActivity::GetDesc()); 209 $this->UninstallModel(MemberPayment::GetDesc()); 210 $this->UninstallModel(Member::GetDesc()); 215 foreach (array_reverse(self::GetModels()) as $Model) 216 { 217 $this->UninstallModel($Model::GetDesc()); 218 } 211 219 } 212 220
Note:
See TracChangeset
for help on using the changeset viewer.