1
|
|
|
<?php
|
2
|
|
|
/**
|
3
|
|
|
* User Resource
|
4
|
|
|
*/
|
5
|
|
|
namespace Twigger\UnionCloud\API\Resource;
|
6
|
|
|
|
7
|
|
|
use Twigger\UnionCloud\API\Exception\Resource\ResourceNotFoundException;
|
8
|
|
|
use Twigger\UnionCloud\API\ResourceCollection;
|
9
|
|
|
|
10
|
|
|
/**
|
11
|
|
|
* Class User
|
12
|
|
|
*
|
13
|
|
|
* @package Twigger\UnionCloud\API\Users\Users
|
14
|
|
|
*
|
15
|
|
|
* @property int $id ID of the user. Not quite sure what this is!
|
16
|
|
|
* @property int $uid UID of the user.
|
17
|
|
|
* @property string $forename User Forename
|
18
|
|
|
* @property string $surname User Surname
|
19
|
|
|
* @property string $email User Email
|
20
|
|
|
* @property int $unionId Union ID
|
21
|
|
|
* @property string $unionName Union Name
|
22
|
|
|
* @property string $organisationName Organization Name
|
23
|
|
|
* @property string $studentId Student ID
|
24
|
|
|
* @property string $dob Date of Birth
|
25
|
|
|
* @property string $gender Gender
|
26
|
|
|
* @property string $institution_email Institution Email
|
27
|
|
|
* @property string $nationality Nationality
|
28
|
|
|
* @property string $domicileCountry Domicile Country
|
29
|
|
|
* @property string $feeStatus Fee Status
|
30
|
|
|
* @property string $hallOfResidence Hall of Residence
|
31
|
|
|
* @property string $programme Programme
|
32
|
|
|
* @property string $courseFinishingYear Course Finishing Year
|
33
|
|
|
* @property string $alternateEmailAddr Alternate Email Address
|
34
|
|
|
* @property boolean $isUploaded Is Uploaded?
|
35
|
|
|
* @property string $userType User Type
|
36
|
|
|
* @property string $isAlumni Is Alumni?
|
37
|
|
|
* @property string $libraryCard Library Card
|
38
|
|
|
* @property string $department Department
|
39
|
|
|
* @property string $erasmus Erasmus
|
40
|
|
|
* @property string $placement Placement
|
41
|
|
|
* @property string $ethnicity Ethnicity
|
42
|
|
|
* @property string $finalist Finalist
|
43
|
|
|
* @property string $modeOfStudy Mode of Study
|
44
|
|
|
* @property string $address Address
|
45
|
|
|
* @property string $postcode Postcode
|
46
|
|
|
* @property string $unionCommunication Union Communication
|
47
|
|
|
* @property string $unionCommercial Union Commercial
|
48
|
|
|
* @property string $nusCommunication NUS Communication
|
49
|
|
|
* @property string $nusCommercial NUS Commercial
|
50
|
|
|
* @property string $termsAndConditions Terms and COnditions
|
51
|
|
|
* @property string $updatedAt Updated At
|
52
|
|
|
* @property string $additionalIdentities Additional Identities
|
53
|
|
|
* @property ResourceCollection $userGroupMemberships User Group Memberships
|
54
|
|
|
*
|
55
|
|
|
*/
|
56
|
|
|
class User extends BaseResource implements IResource
|
57
|
|
|
{
|
58
|
|
|
|
59
|
|
|
/**
|
60
|
|
|
* Enable casting for this resource
|
61
|
|
|
*
|
62
|
|
|
* @var array
|
63
|
|
|
*/
|
64
|
|
|
protected $casts = [
|
65
|
|
|
'dob' => 'date',
|
66
|
|
|
'courseFinishingYear' => 'date',
|
67
|
|
|
'updatedAt' => 'date',
|
68
|
|
|
'forename' => 'properCase',
|
69
|
|
|
'surname' => 'properCase',
|
70
|
|
|
'userGroupMemberships' => UserGroupMembership::class,
|
71
|
|
|
];
|
72
|
|
|
/**
|
73
|
|
|
* Set the model parameters
|
74
|
|
|
*
|
75
|
|
|
* User constructor.
|
76
|
|
|
*
|
77
|
|
|
* @param $resource
|
78
|
|
|
*
|
79
|
|
|
* @throws ResourceNotFoundException
|
80
|
|
|
*/
|
81
|
|
|
public function __construct($resource)
|
82
|
|
|
{
|
83
|
|
|
parent::__construct($resource);
|
84
|
|
|
|
85
|
|
|
}
|
86
|
|
|
} |