Town.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace common\models\user;
  3. use common\models\base\BaseActiveRecord;
  4. use Yii;
  5. /**
  6. * This is the model class for table "qimall_town".
  7. *
  8. *
  9. * @property int $id
  10. * @property int|null $district_id
  11. * @property int|null $adcode
  12. * @property string|null $name
  13. * @property int $created_at
  14. * @property int $updated_at
  15. */
  16. class Town extends BaseActiveRecord
  17. {
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public static function tableName()
  22. {
  23. return '{{%town}}';
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function rules()
  29. {
  30. return [
  31. [['district_id', 'adcode', 'created_at', 'updated_at'], 'integer'],
  32. [['name'], 'string', 'max' => 45],
  33. ];
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function attributeLabels()
  39. {
  40. return [
  41. 'id' => 'ID',
  42. 'district_id' => 'District ID',
  43. 'adcode' => 'Adcode',
  44. 'name' => 'Name',
  45. 'created_at' => 'Created At',
  46. 'updated_at' => 'Updated At',
  47. ];
  48. }
  49. }