You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
860 B

  1. <?php
  2. namespace backend\modules\shop\models\ars;
  3. use Yii;
  4. use yii\behaviors\TimestampBehavior;
  5. /**
  6. * This is the model class for table "area".
  7. *
  8. * @property int $id
  9. * @property string $name
  10. * @property int $area_id
  11. * @property int $city_id
  12. */
  13. class Area extends \yii\db\ActiveRecord
  14. {
  15. /**
  16. * {@inheritdoc}
  17. */
  18. public static function tableName()
  19. {
  20. return 'area';
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function rules()
  26. {
  27. return [
  28. [['area_id', 'city_id'], 'integer'],
  29. [['name'], 'string', 'max' => 32],
  30. ];
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function attributeLabels()
  36. {
  37. return [
  38. 'id' => 'id',
  39. 'name' => 'name',
  40. 'area_id' => 'area_id',
  41. 'city_id' => 'city_id',
  42. ];
  43. }
  44. }