UploadGoodsImage.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. /**
  9. * Class StoreMedia
  10. * @package app\models
  11. * @property integer $id
  12. * @property integer $store_id
  13. * @property integer $goods_id
  14. * @property string $pic_url
  15. * @property integer $status
  16. * @property integer $is_delete
  17. * @property integer $created_at
  18. * @property integer $updated_at
  19. * @property string $image_name
  20. **/
  21. class UploadGoodsImage extends \yii\db\ActiveRecord
  22. {
  23. /**
  24. * @inheritdoc
  25. */
  26. public static function tableName()
  27. {
  28. return '{{%upload_goods_image}}';
  29. }
  30. /**
  31. * @inheritdoc
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [["id", "store_id", "goods_id", "status", "is_delete", "created_at", "updated_at"], 'integer'],
  37. [["pic_url"], 'string'],
  38. [["store_id", "goods_id", "pic_url",], 'required'],
  39. [["status", "is_delete", "created_at", "updated_at"], 'default', 'value' => 0]
  40. ];
  41. }
  42. /**
  43. * @inheritdoc
  44. */
  45. public function attributeLabels()
  46. {
  47. return [
  48. "id" => "ID",
  49. "store_id" => "商城ID",
  50. "goods_id" => "商品ID",
  51. "pic_url" => "图片链接",
  52. "status" => "图库最大容纳数量",
  53. "is_delete" => "当前图库图片数量",
  54. "created_at" => "创建时间",
  55. "updated_at" => "更新时间"
  56. ];
  57. }
  58. }