| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- namespace common\models\user;
- use common\enums\AddonsEnum;
- use common\enums\OrderStatusEnum;
- use common\enums\RabbitMqEnum;
- use common\enums\StatusEnum;
- use common\models\mall\Mall;
- use common\models\mall\MallAddons;
- use common\models\order\Order;
- use common\models\order\OrderRefund;
- use Exception;
- use Yii;
- /**
- * This is the model class for table "qimall_user_team_profit_statistics".
- *
- * @property int $id
- * @property int $mall_id 商城id
- * @property int $user_id 用户id
- * @property float $children_order_pay_profit 下级团队订单支付总利润(不包含自己)
- * @property float $team_order_pay_profit 团队订单支付总利润(包含自己)
- * @property float $children_order_finish_profit 下级团队订单完成总利润(不包含自己)
- * @property float $team_order_finish_profit 团队订单完成总利润(包含自己)
- * @property int|null $created_at 添加时间
- * @property int|null $updated_at 修改时间
- */
- class UserTeamProfitStatisticsLog extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_user_team_profit_statistics_log';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'goods_id', 'order_detail_id', 'order_id', 'status', 'created_at', 'updated_at'], 'integer'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'user_id' => 'User ID',
- 'children_order_pay_profit' => 'Children Order Pay Profit',
- 'team_order_pay_profit' => 'Team Order Pay Profit',
- 'children_order_finish_profit' => 'Children Order Finish Profit',
- 'team_order_finish_profit' => 'Team Order Finish Profit',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- ];
- }
- public static function setData(array $data)
- {
- try {
- $model = new self();
- $model->loadDefaultValues();
- if (!$model->load($data, '') || !$model->save()) {
- throw new \Exception($model->getErrorMessage());
- }
- return $model;
- } catch (\Exception $e) {
- self::setStaticError($e->getMessage());
- return false;
- }
- }
-
- }
|