-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathProjectRole.php
More file actions
46 lines (38 loc) · 1.12 KB
/
ProjectRole.php
File metadata and controls
46 lines (38 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Laddr;
use Emergence\People\Person;
class ProjectRole extends \ActiveRecord
{
// ActiveRecord configuration
public static $tableName = 'project_roles'; // the name of this model's table
// controllers will use these values to figure out what templates to use
public static $singularNoun = 'project role'; // a singular noun for this model's object
public static $pluralNoun = 'project roles'; // a plural noun for this model's object
// gets combined with all the extended layers
public static $fields = [
'ProjectID' => 'uint',
'PersonID' => [
'type' =>'uint',
'default'=>null
],
'Role' => 'string',
'Description' => [
'type' =>'string',
'default'=>null
]
];
public static $relationships = [
'Project' => [
'type' => 'one-one',
'class' => Project::class
],
'Person' => [
'type' => 'one-one',
'class' => Person::class
]
];
public static $dynamicFields = [
'Project',
'Person'
];
}