QiShangTongRegion.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace addons\QiShangTong\common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "qimall_addons_qi_shang_tong_region".
  6. *
  7. * @property int $id ID
  8. * @property int $created_at 创建时间
  9. * @property int $updated_at 更新时间
  10. * @property string $name 地区名称
  11. * @property int $province_id 省份ID
  12. * @property int $city_id 城市ID
  13. * @property int $district_id 地区ID
  14. * @property string $province 省份
  15. * @property string $city 城市
  16. * @property string $district 地区
  17. * @property int $level 级别
  18. * @property int $local_id 本地ID
  19. * @property int $local_province_id 本地省份ID
  20. * @property int $local_city_id 本地城市ID
  21. * @property int $local_district_id 本地地区ID
  22. * @property string $local_province 本地省份
  23. * @property string $local_city 本地城市
  24. * @property string $local_district 本地地区
  25. * @property string $local_name 本地名称
  26. * @property string $region 完整名称 省市区镇
  27. */
  28. class QiShangTongRegion extends \common\models\base\BaseActiveRecord
  29. {
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public static function tableName()
  34. {
  35. return 'qimall_addons_qi_shang_tong_region';
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function rules()
  41. {
  42. return [
  43. [['id'], 'required'],
  44. [['id', 'created_at', 'updated_at', 'province_id', 'city_id', 'district_id', 'level', 'local_id', 'local_province_id', 'local_city_id', 'local_district_id'], 'integer'],
  45. [['name', 'province', 'city', 'district', 'local_province', 'local_city', 'local_district', 'local_name'], 'string', 'max' => 50],
  46. [['region'], 'string', 'max' => 255],
  47. [['id'], 'unique'],
  48. ];
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. 'id' => 'ID',
  57. 'created_at' => 'Created At',
  58. 'updated_at' => 'Updated At',
  59. 'name' => 'Name',
  60. 'province_id' => 'Province ID',
  61. 'city_id' => 'City ID',
  62. 'district_id' => 'District ID',
  63. 'province' => 'Province',
  64. 'city' => 'City',
  65. 'district' => 'District',
  66. 'level' => 'Level',
  67. 'local_id' => 'Local ID',
  68. 'local_province_id' => 'Local Province ID',
  69. 'local_city_id' => 'Local City ID',
  70. 'local_district_id' => 'Local District ID',
  71. 'local_province' => 'Local Province',
  72. 'local_city' => 'Local City',
  73. 'local_district' => 'Local District',
  74. 'local_name' => 'Local Name',
  75. 'region' => 'Region',
  76. ];
  77. }
  78. }