db_acl.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * This is Acl Schema file
  4. *
  5. * Use it to configure database for ACL
  6. *
  7. * PHP 5
  8. *
  9. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  10. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. *
  12. * Licensed under The MIT License
  13. * Redistributions of files must retain the above copyright notice.
  14. *
  15. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  16. * @link http://cakephp.org CakePHP(tm) Project
  17. * @package app.Config.Schema
  18. * @since CakePHP(tm) v 0.2.9
  19. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  20. */
  21. /*
  22. *
  23. * Using the Schema command line utility
  24. * cake schema run create DbAcl
  25. *
  26. */
  27. class DbAclSchema extends CakeSchema {
  28. public $name = 'DbAcl';
  29. public function before($event = array()) {
  30. return true;
  31. }
  32. public function after($event = array()) {
  33. }
  34. public $acos = array(
  35. 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
  36. 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  37. 'model' => array('type' => 'string', 'null' => true),
  38. 'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  39. 'alias' => array('type' => 'string', 'null' => true),
  40. 'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  41. 'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  42. 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
  43. );
  44. public $aros = array(
  45. 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
  46. 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  47. 'model' => array('type' => 'string', 'null' => true),
  48. 'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  49. 'alias' => array('type' => 'string', 'null' => true),
  50. 'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  51. 'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  52. 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
  53. );
  54. public $aros_acos = array(
  55. 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
  56. 'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
  57. 'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
  58. '_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
  59. '_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
  60. '_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
  61. '_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
  62. 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
  63. );
  64. }