forked from yiisoft/yii2-app-advanced
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Orgn.php
76 lines (69 loc) · 1.47 KB
/
Orgn.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
namespace biz\models;
use Yii;
/**
* This is the model class for table "orgn".
*
* @property integer $id_orgn
* @property string $cd_orgn
* @property string $nm_orgn
* @property string $create_date
* @property integer $create_by
* @property string $update_date
* @property integer $update_by
*
* @property Branch[] $branches
*/
class Orgn extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'orgn';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['cd_orgn', 'nm_orgn'], 'required'],
[['cd_orgn'], 'string', 'max' => 4],
[['nm_orgn'], 'string', 'max' => 64]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id_orgn' => 'Id Orgn',
'cd_orgn' => 'Cd Orgn',
'nm_orgn' => 'Nm Orgn',
'create_date' => 'Create Date',
'create_by' => 'Create By',
'update_date' => 'Update Date',
'update_by' => 'Update By',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getBranches()
{
return $this->hasMany(Branch::className(), ['id_orgn' => 'id_orgn']);
}
/**
* @inheritdoc
*/
public function behaviors()
{
return [
'biz\behaviors\AutoTimestamp',
'biz\behaviors\AutoUser',
];
}
}