portal.mkgtu.ru/common/models/RegistrationNumber.php

40 lines
688 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?php
namespace common\models;
class RegistrationNumber extends \yii\db\ActiveRecord
{
public static function tableName()
{
return '{{%user_regnumber}}';
}
public function rules()
{
return [
[['user_id'],'integer'],
[['registration_number'], 'string', 'max' => 100],
[['user_id', 'registration_number'], 'required'],
['registration_number','unique'],
];
}
public function attributeLabels()
{
return [
'user_id' => 'Пользователь',
'registration_number' => 'Регномер',
];
}
}