BusinessCardBuriedPoint.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace addons\BusinessCard\common\models;
  3. use common\models\goods\Goods;
  4. use Yii;
  5. /**
  6. * This is the model class for table "qimall_addons_business_card_buried_point".
  7. *
  8. * @property int $id
  9. * @property int $mall_id
  10. * @property int $user_id
  11. * @property int $item_id 对象ID
  12. * @property int $log_type 101首页,102商品详情
  13. * @property int $status 状态[1启用 0禁用 -1删除]
  14. * @property int $created_at 创建时间
  15. * @property int $updated_at 更新事件
  16. * @property int $object_id 更新事件
  17. * @property array|null $ext_data
  18. */
  19. class BusinessCardBuriedPoint extends \common\models\base\BaseActiveRecord
  20. {
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public static function tableName()
  25. {
  26. return 'qimall_addons_business_card_buried_point';
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function rules()
  32. {
  33. return [
  34. [['mall_id', 'user_id', 'item_id', 'log_type', 'status', 'created_at', 'updated_at', 'object_id'], 'integer'],
  35. [['ext_data'], 'safe'],
  36. ];
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => 'ID',
  45. 'mall_id' => 'Mall ID',
  46. 'user_id' => 'User ID',
  47. 'item_id' => 'Item ID',
  48. 'log_type' => 'Log Type',
  49. 'status' => 'Status',
  50. 'created_at' => 'Created At',
  51. 'updated_at' => 'Updated At',
  52. 'ext_data' => 'Ext Data',
  53. ];
  54. }
  55. public function getGoods()
  56. {
  57. return $this->hasOne(Goods::class, ['id' => 'object_id']);
  58. }
  59. }