Requisites.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "requisites".
  6. *
  7. * @property integer $id
  8. * @property integer $user_id
  9. * @property integer $account
  10. * @property string $bank
  11. * @property string $city
  12. * @property integer $mfo
  13. * @property integer $zkpo
  14. * @property string $title;
  15. */
  16. class Requisites extends \yii\db\ActiveRecord
  17. {
  18. public $title;
  19. /**
  20. * @inheritdoc
  21. */
  22. public static function tableName()
  23. {
  24. return 'requisites';
  25. }
  26. /**
  27. * @inheritdoc
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['user_id', 'account', 'bank', 'city', 'mfo', 'zkpo'], 'required'],
  33. [['user_id', 'mfo', 'zkpo'], 'integer'],
  34. [['bank'], 'string', 'max' => 50],
  35. [['city'], 'string', 'max' => 20]
  36. ];
  37. }
  38. /**
  39. * @inheritdoc
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => Yii::t('app', 'ID'),
  45. 'user_id' => Yii::t('app', 'User ID'),
  46. 'account' => Yii::t('app', 'Рахунок'),
  47. 'bank' => Yii::t('app', 'Банк'),
  48. 'city' => Yii::t('app', 'в місті'),
  49. 'mfo' => Yii::t('app', 'МФО'),
  50. 'zkpo' => Yii::t('app', 'ЄДРПОУ'),
  51. ];
  52. }
  53. }