
130
[['SecondName', 'FirstName', 'MiddleName'], 'string', 'max' => 45],
[['Address'], 'string', 'max' => 100],
[['Phone'], 'string', 'max' => 15],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'IdCustomer' => 'Id Customer',
'SecondName' => 'Second Name',
'FirstName' => 'First Name',
'MiddleName' => 'Middle Name',
'Address' => 'Address',
'Phone' => 'Phone',
];
}
public static function tableName()
{
return 'orders';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['Date', 'Customers_IdCustomer', 'Users_IdUser',
'Literature_IdLiterature', 'Count'], 'required'],
[['Date'], 'safe'],
[['Customers_IdCustomer', 'Users_IdUser',
'Literature_IdLiterature', 'Count'], 'integer'],
[['Customers_IdCustomer'], 'exist', 'skipOnError' => true,
'targetClass' => Customers::className(), 'targetAttribute' => ['Customers_IdCustomer'
=> 'IdCustomer']],
[['Users_IdUser'], 'exist', 'skipOnError' => true, 'targetClass' =>
Users::className(), 'targetAttribute' => ['Users_IdUser' => 'IdUser']],
[['Literature_IdLiterature'], 'exist', 'skipOnError' => true,
'targetClass' => Services::className(), 'targetAttribute' =>
['Literature_IdLiterature' => 'IdService']],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'IdOrder' => 'Id Order',
'Date' => 'Дата',
'Customers_IdCustomer' => 'Клиент',