64], [['wallet_desc', 'contributor_name'], 'string', 'max' => 255], [['order_no'], 'string', 'max' => 100], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => '商城ID', 'user_id' => '用户ID', 'compute_type' => '结算方式, 0订单完成后,1订单支付后', 'wallet_type' => '资产类型', 'wallet_num' => '结算资产数量', 'day_num' => '延时天数', 'wallet_desc' => '资产变动说明', 'order_no' => '订单编号', 'capital_type' => '资金奖励类型', 'contributor_name' => '资产类型', 'contributor_money' => '分佣金额/手续费', 'contributor_id' => '贡献者id', 'status' => '状态,0未结算,1已结算', 'agented_at' => '结算时间', 'created_at' => '创建时间', 'updated_at' => '更新时间', ]; } /** * @desc:关联会员信息 * @Author: hua * @Date: 2022/1/18 * @Time: 17:25 * @Copyright: copyright (c) 2021 广东七件事集团 * @return \yii\db\ActiveQuery */ public function getUser(): \yii\db\ActiveQuery { return $this->hasOne(User::class, ['id' => 'user_id'])->select('id,mobile,nickname,avatar_url'); } public static function batchSave($data) { if (empty($data) || !is_array($data)) return false; foreach ($data as $item) { if (!is_array($item)) continue; $model = new self(); foreach ($item as $k => $v) { $model->$k = $v; } $model->save(); } return true; } }