pmtpenza

Untitled

Sep 6th, 2019
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. <?php
  2.  
  3. namespace common\models;
  4.  
  5. use Yii;
  6.  
  7. /**
  8. * This is the model class for table "contactmaster".
  9. *
  10. * @property int $id
  11. * @property string $name
  12. * @property string $phone
  13. * @property int $specialnosty_id
  14. */
  15. class Contactmaster extends \yii\db\ActiveRecord
  16. {
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public static function tableName()
  21. {
  22. return 'contactmaster';
  23. }
  24.  
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function rules()
  29. {
  30. return [
  31. [['name', 'phone'], 'required'],
  32. [['specialnosty_id'], 'integer'],
  33. [['name', 'phone'], 'string', 'max' => 50],
  34. ];
  35. }
  36.  
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function attributeLabels()
  41. {
  42. return [
  43. 'id' => 'ID',
  44. 'name' => 'Name',
  45. 'phone' => 'Phone',
  46. 'specialnosty_id' => 'Specialnosty ID',
  47. ];
  48. }
  49. }
Add Comment
Please, Sign In to add comment