commit | author | age
|
2207d6
|
1 |
<?php |
W |
2 |
|
|
3 |
namespace app\models; |
|
4 |
|
|
5 |
use Yii; |
|
6 |
|
|
7 |
/** |
|
8 |
* This is the model class for table "{{%core_validate_code}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property string $target |
|
12 |
* @property string $code |
|
13 |
* @property string $created_at |
|
14 |
* @property string $updated_at |
|
15 |
* @property int $is_validated 是否已验证:0=未验证,1-已验证 |
|
16 |
*/ |
|
17 |
class CoreValidateCode extends ModelActiveRecord |
|
18 |
{ |
|
19 |
/** |
|
20 |
* 是否验证 |
|
21 |
*/ |
|
22 |
const IS_VALIDATED_TRUE = 1;// 已验证 |
|
23 |
const IS_VALIDATED_FALSE = 0;// 未验证 |
|
24 |
|
|
25 |
/** |
|
26 |
* {@inheritdoc} |
|
27 |
*/ |
|
28 |
public static function tableName() |
|
29 |
{ |
|
30 |
return '{{%core_validate_code}}'; |
|
31 |
} |
|
32 |
|
|
33 |
/** |
|
34 |
* {@inheritdoc} |
|
35 |
*/ |
|
36 |
public function rules() |
|
37 |
{ |
|
38 |
return [ |
|
39 |
[['target', 'code', 'created_at', 'updated_at'], 'required'], |
|
40 |
[['created_at', 'updated_at'], 'safe'], |
|
41 |
[['is_validated'], 'integer'], |
|
42 |
[['target'], 'string', 'max' => 255], |
|
43 |
[['code'], 'string', 'max' => 128], |
|
44 |
]; |
|
45 |
} |
|
46 |
|
|
47 |
/** |
|
48 |
* {@inheritdoc} |
|
49 |
*/ |
|
50 |
public function attributeLabels() |
|
51 |
{ |
|
52 |
return [ |
|
53 |
'id' => 'ID', |
|
54 |
'target' => 'Target', |
|
55 |
'code' => 'Code', |
|
56 |
'created_at' => 'Created At', |
|
57 |
'updated_at' => 'Updated At', |
|
58 |
'is_validated' => 'Is Validated', |
|
59 |
]; |
|
60 |
} |
|
61 |
} |