FounderOwnUsersGroups.php 693 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. namespace We7\Table\Users;
  7. class FounderOwnUsersGroups extends \We7Table {
  8. protected $tableName = 'users_founder_own_users_groups';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'founder_uid',
  12. 'users_group_id',
  13. );
  14. protected $default = array(
  15. 'founder_uid' => '',
  16. 'users_group_id' => '',
  17. );
  18. public function addOwnUsersGroup($founder_uid, $users_group_id) {
  19. $fill = array(
  20. 'founder_uid' => $founder_uid,
  21. 'users_group_id' => $users_group_id,
  22. );
  23. return $this->fill($fill)->save();
  24. }
  25. }