-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.php
More file actions
executable file
·56 lines (51 loc) · 1.31 KB
/
Copy pathClient.php
File metadata and controls
executable file
·56 lines (51 loc) · 1.31 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
47
48
49
50
51
52
53
54
55
56
<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "client".
*
* @property integer $id
* @property string $code_school
* @property string $school_db
* @property string $school_name
* @property string $email
* @property integer $is_public
*/
class Client extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'client';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['code_school', 'school_db', 'school_name'], 'required'],
[['is_public'], 'integer'],
[['code_school'], 'string', 'max' => 64],
[['school_db', 'email'], 'string', 'max' => 128],
[['school_name'], 'string', 'max' => 255],
[['code_school', 'email'], 'unique', 'targetAttribute' => ['code_school', 'email'], 'message' => 'The combination of Code School and Email has already been taken.'],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'code_school' => 'Code School',
'school_db' => 'School Db',
'school_name' => 'School Name',
'email' => 'Email',
'is_public' => 'Is Public',
];
}
}