| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- namespace addons\DoubleCopy\common\models;
- use common\models\user\User;
- use yii\db\Exception;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_double_copy_spread".
- *
- * @property int $id
- * @property int $mall_id
- * @property int $pull_user_id 选择下级用户
- * @property int $push_user_id 绑定上级用户
- * @property int $original_pid 原来的推荐人ID
- * @property int $admin_id 后台操作用户ID
- * @property int|null $created_at 创建时间
- */
- class DoubleCopySpread extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_double_copy_spread';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'pull_user_id', 'push_user_id', 'created_at','admin_id','updated_at'], 'integer'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'pull_user_id' => 'Pull User ID',
- 'push_user_id' => 'Push User ID',
- 'spread_status' => 'Spread Status',
- 'created_at' => 'Created At',
- ];
- }
- /**
- * 关联用户表
- * @Author: lun
- * @DateTime: 2022/9/16 0016 16:50
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @return \yii\db\ActiveQuery
- */
- public function getPullUser()
- {
- return $this->hasOne(User::class, ['id' => 'pull_user_id'])->select('id,mobile,nickname,avatar_url,parent_id');
- }
- /**
- * 关联用户表
- * @Author: lun
- * @DateTime: 2022/9/16 0016 16:50
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @return \yii\db\ActiveQuery
- */
- public function getPushUser()
- {
- return $this->hasOne(User::class, ['id' => 'push_user_id'])->select('id,mobile,nickname,avatar_url,parent_id');
- }
- /**
- * 关联用户表
- * @Author: lun
- * @DateTime: 2022/9/16 0016 16:50
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @return \yii\db\ActiveQuery
- */
- public function getOriginalUser()
- {
- return $this->hasOne(User::class, ['id' => 'original_pid'])->select('id,mobile,nickname,avatar_url,parent_id');
- }
- }
|