Changeset 894 for trunk/Modules/User
- Timestamp:
- Jan 5, 2021, 10:30:31 PM (4 years ago)
- Location:
- trunk/Modules/User
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/User.php
r893 r894 25 25 function GetModels(): array 26 26 { 27 return array('User', 'UserOnline', 'PermissionGroup', 'PermissionOperation', 'PermissionGroupAssignment', 'PermissionUserAssignment'); 27 return array(User::GetClassName(), UserOnline::GetClassName(), PermissionGroup::GetClassName(), PermissionOperation::GetClassName(), 28 PermissionGroupAssignment::GetClassName(), PermissionUserAssignment::GetClassName()); 28 29 } 29 30 -
trunk/Modules/User/UserModel.php
r891 r894 67 67 static function GetDesc(): ModelDesc 68 68 { 69 $Desc = new ModelDesc( 'User');69 $Desc = new ModelDesc(self::GetClassName()); 70 70 $Column = $Desc->AddString('Login'); 71 71 $Column->Unique = true; … … 458 458 static function GetDesc(): ModelDesc 459 459 { 460 $Desc = new ModelDesc( 'UserOnline');460 $Desc = new ModelDesc(self::GetClassName()); 461 461 $Desc->Memory = true; 462 $Desc->AddReference('User', 'User', true);462 $Desc->AddReference('User', User::GetClassName(), true); 463 463 $Desc->AddDateTime('ActivityTime'); 464 464 $Desc->AddDateTime('LoginTime'); … … 477 477 static function GetDesc(): ModelDesc 478 478 { 479 $Desc = new ModelDesc( 'PermissionGroup');479 $Desc = new ModelDesc(self::GetClassName()); 480 480 $Desc->AddString('Description'); 481 481 return $Desc; … … 487 487 static function GetDesc(): ModelDesc 488 488 { 489 $Desc = new ModelDesc( 'PermissionGroupAssignment');490 $Desc->AddReference('Group', 'PermissionGroup');491 $Desc->AddReference('AssignedGroup', 'PermissionGroup', true);492 $Desc->AddReference('AssignedOperation', 'PermissionOperation', true);489 $Desc = new ModelDesc(self::GetClassName()); 490 $Desc->AddReference('Group', PermissionGroup::GetClassName()); 491 $Desc->AddReference('AssignedGroup', PermissionGroup::GetClassName(), true); 492 $Desc->AddReference('AssignedOperation', PermissionOperation::GetClassName(), true); 493 493 return $Desc; 494 494 } … … 499 499 static function GetDesc(): ModelDesc 500 500 { 501 $Desc = new ModelDesc( 'PermissionOperation');502 $Desc->AddReference('Module', 'Module');501 $Desc = new ModelDesc(self::GetClassName()); 502 $Desc->AddReference('Module', Module::GetClassName()); 503 503 $Desc->AddString('Operation'); 504 504 $Desc->AddString('Item'); … … 513 513 static function GetDesc(): ModelDesc 514 514 { 515 $Desc = new ModelDesc( 'PermissionUserAssignment');516 $Desc->AddReference('User', 'User');517 $Desc->AddReference('AssignedGroup', 'PermissionGroup', true);518 $Desc->AddReference('AssignedOperation', 'PermissionOperation', true);515 $Desc = new ModelDesc(self::GetClassName()); 516 $Desc->AddReference('User', User::GetClassName()); 517 $Desc->AddReference('AssignedGroup', PermissionGroup::GetClassName(), true); 518 $Desc->AddReference('AssignedOperation', PermissionOperation::GetClassName(), true); 519 519 return $Desc; 520 520 }
Note:
See TracChangeset
for help on using the changeset viewer.