Skip to content

Commit c616ba1

Browse files
authored
Merge pull request #13 from zhanghangt/master
Update Rule.php - 设置字段信息,减少数据库请求.
2 parents 23766ea + f5be02f commit c616ba1

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/model/Rule.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@
1010
*/
1111
class Rule extends Model implements Arrayable
1212
{
13+
/**
14+
* 设置字段信息
15+
*
16+
* @var array
17+
*/
18+
protected $schema = [
19+
'id' => 'int',
20+
'ptype' => 'string',
21+
'v0' => 'string',
22+
'v1' => 'string',
23+
'v2' => 'string',
24+
'v3' => 'string',
25+
'v4' => 'string',
26+
'v5' => 'string',
27+
];
1328
/**
1429
* 架构函数
1530
* @access public
@@ -36,4 +51,4 @@ protected function config(string $key = null, $default = null)
3651
$driver = config('tauthz.default');
3752
return config('tauthz.enforcers.'.$driver.'.'.$key, $default);
3853
}
39-
}
54+
}

0 commit comments

Comments
 (0)