1
0
Fork 0
mirror of https://github.com/janickiy/yii2-nomer synced 2025-02-15 03:11:58 +00:00
yii2-nomer/models/BlockPhone.php
2020-02-05 06:34:26 +03:00

61 lines
1.1 KiB
PHP

<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "block".
*
* @property integer $id
* @property string $phone
* @property string $ip
* @property string $ua
* @property string $tm
* @property string $code
* @property integer $status
* @property integer $site_id
*/
class BlockPhone extends \yii\db\ActiveRecord
{
const STATUS_UNCONFIRMED = 0;
const STATUS_CONFIRMED = 1;
const STATUS_PAID = 2;
/**
* @inheritdoc
*/
public static function tableName()
{
return 'block';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['tm'], 'safe'],
[['status', 'site_id'], 'integer'],
[['phone', 'ip', 'ua'], 'string', 'max' => 255],
[['code'], 'string', 'max' => 4],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'phone' => 'Phone',
'ip' => 'Ip',
'ua' => 'Ua',
'tm' => 'Tm',
'code' => 'Code',
'status' => 'Status',
];
}
}