-
Notifications
You must be signed in to change notification settings - Fork 0
/
Student.php
57 lines (52 loc) · 1.19 KB
/
Student.php
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
47
48
49
50
51
52
53
54
55
56
57
<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "student".
*
* @property string $name
* @property string $email
* @property string $institute
* @property integer $phone
* @property string $area_of_interest
*/
class Student extends \yii\db\ActiveRecord
{
public $file;
/**
* @inheritdoc
*/
public static function tableName()
{
return 'student';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['name', 'email', 'institute', 'phone', 'area_of_interest'], 'required'],
[['phone'], 'integer'],
['phone','double'],
[['file'],'file'],
['phone','string','length'=>[10]],
[['area_of_interest','resume'], 'string'],
[['name', 'email', 'institute'], 'string', 'max' => 100],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'name' => 'Name',
'email' => 'Email',
'institute' => 'Institute',
'phone' => 'Phone',
'area_of_interest' => 'Area Of Interest',
'file' => 'Resume',
];
}
}