12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace common\models;
- use Yii;
- /**
- * This is the model class for table "{{%tel}}".
- *
- * @property string $id
- * @property integer $uid
- * @property string $tel
- * @property integer $status
- * @property integer $type
- * @property integer $created_at
- */
- class Tel extends \yii\db\ActiveRecord
- {
- const STATUS_DELETED = 0;
- const STATUS_ACTIVE = 10;
- const TYPE_COMPANY = 10; //公司
- const TYPE_CLIENT = 20; //客户
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%tel}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['uid', 'tel', 'status', 'type', 'created_at'], 'required'],
- [['uid', 'status', 'type', 'created_at'], 'integer'],
- [['tel'], 'string', 'max' => 32],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'uid' => '用户id',
- 'tel' => 'Tel',
- 'status' => 'Status',
- 'type' => 'Type',
- 'created_at' => 'Created At',
- ];
- }
- }
|