PromoterSkus.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use GuzzleHttp\Client;
  9. use Yii;
  10. use yii\behaviors\TimestampBehavior;
  11. use app\modules\admin\models\wechat_mp\CardForm;
  12. use app\utils\IotCloudHelper;
  13. use yii\redis\Cache;
  14. /**
  15. * This is the model class for table "{{%promoter_skus}}".
  16. *
  17. * @property integer $id
  18. * @property integer $sku_id
  19. * @property integer $product_id
  20. * @property string $thumb_img
  21. * @property string $sale_price
  22. * @property string $sku_attrs
  23. * @property string $sku_deliver_info
  24. * @property integer $stock_num
  25. * @property string $created_at
  26. * @property string $updated_at
  27. */
  28. class PromoterSkus extends \yii\db\ActiveRecord
  29. {
  30. /**
  31. * @inheritdoc
  32. */
  33. public static function tableName()
  34. {
  35. return '{{%promoter_skus}}';
  36. }
  37. /**
  38. * @inheritdoc
  39. */
  40. public function rules()
  41. {
  42. return [
  43. [[], 'required'],
  44. [['id', 'sku_id','product_id', 'stock_num'], 'integer'],
  45. [['sale_price'], 'number'],
  46. [['thumb_img', 'sku_attrs', 'sku_deliver_info','created_at','updated_at'], 'string'],
  47. ];
  48. }
  49. /**
  50. * @inheritdoc
  51. */
  52. public function attributeLabels()
  53. {
  54. return [
  55. 'id' => 'ID',
  56. ];
  57. }
  58. }