FreeDeliveryRules.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. /**
  11. * This is the model class for table "{{%free_delivery_rules}}".
  12. *
  13. * @property integer $id
  14. * @property integer $store_id
  15. * @property integer $mch_id
  16. * @property string $price
  17. * @property string $city
  18. * @property integer $is_delete
  19. * @property string $express
  20. * @property string $updated_at
  21. */
  22. class FreeDeliveryRules extends \yii\db\ActiveRecord
  23. {
  24. /**
  25. * @inheritdoc
  26. */
  27. public static function tableName()
  28. {
  29. return '{{%free_delivery_rules}}';
  30. }
  31. public function behaviors()
  32. {
  33. return [
  34. [
  35. // 自动更新创建和更新时间
  36. 'class' => TimestampBehavior::class,
  37. 'value' => time()
  38. ]
  39. ];
  40. }
  41. /**
  42. * @inheritdoc
  43. */
  44. public function rules()
  45. {
  46. return [
  47. [['store_id', 'mch_id'], 'required'],
  48. [['store_id', 'mch_id', 'created_at', 'is_delete', 'updated_at'], 'integer'],
  49. [['price'], 'number'],
  50. [['city', 'name'], 'string'],
  51. ];
  52. }
  53. /**
  54. * @inheritdoc
  55. */
  56. public function attributeLabels()
  57. {
  58. return [
  59. 'id' => 'ID',
  60. 'store_id' => 'Store ID',
  61. 'mch_id' => 'mch id',
  62. 'price' => 'Price',
  63. 'city' => 'City',
  64. 'updated_at' => '更新时间',
  65. 'created_at' => '创建时间',
  66. 'is_delete' => '删除',
  67. 'name' => '名称'
  68. ];
  69. }
  70. }