| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- /**
- * Class WeChatSharerLive
- * @package app\models
- * @property integer $id
- * @property string $wechat_appid
- * @property string $talent_appid
- * @property string $export_id
- * @property string $description
- * @property integer $store_id
- * @property integer $type
- * @property integer $start_time
- * @property integer $sort
- * @property integer $is_show
- * @property integer $is_from
- * @property string $promoter_share_link
- **/
- class WeChatSharerLive extends \yii\db\ActiveRecord
- {
- /**
- * @var mixed|null
- */
- public $mini_info;
- const TYPE_LIVE = 1;
- const TYPE_NOTICE = 0;
- const IS_LIVE_FROM_TALENT = 1;
- const IS_LIVE_FROM_PROMOTER = 2;
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%wechat_sharer_live}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['id', 'store_id', 'type', 'start_time', 'sort', 'is_show', 'is_from'], 'integer'],
- [["wechat_appid", "talent_appid", "export_id", "description", "promoter_share_link"], 'string'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => "ID",
- 'store_id' => "商城ID",
- ];
- }
- public function getPromotions()
- {
- return $this->hasMany(WeChatSharer::class, ['sharer_appid' => 'sharer_appid'])
- ->viaTable(WeChatSharerLiveQrCode::tableName(), ['export_id' => 'export_id']);
- }
- public function getProducts()
- {
- return $this->hasMany(WeChatSharerProduct::class, ['talent_appid' => 'talent_appid']);
- }
- public function getTalent()
- {
- return $this->hasOne(PromoterTalent::class, ['talent_appid' => 'talent_appid']);
- }
- }
|