| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- namespace addons\ServeBonus\common\models;
- use common\models\user\User;
- use Yii;
- /**
- * This is the model class for table "{{%addons_servebonus_reward_log}}".
- *
- * @property int $id
- * @property int $mall_id 商城ID
- * @property int $order_id 订单ID
- * @property string $order_no 订单编号
- * @property int $user_id 用户ID
- * @property int $type 结算类型:1出单奖励,2加权平分
- * @property int $level 结算时用户的服务商等级
- * @property float $amounts 结算的总金额,单位:元
- * @property float $commission 结算的佣金,单位:元
- * @property string|null $settlement_config 结算时的配置
- * @property string|null $settlement_data 结算时的数据
- * @property int $is_settlement 是否已结算【0否,1是】
- * @property int $period_id 分红期数ID
- * @property int $date 数据生成日期
- * @property int|null $status 状态[-1:删除;0:禁用;1启用]
- * @property int $created_at
- * @property int $updated_at
- */
- class ServeBonusRewardLog extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%addons_servebonus_reward_log}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'order_id', 'user_id', 'type', 'level', 'is_settlement', 'date', 'period_id', 'status', 'created_at', 'updated_at','is_cloud_stock'], 'integer'],
- [['amounts', 'commission'], 'number'],
- [['settlement_config', 'settlement_data'], 'string'],
- [['order_no'], 'string', 'max' => 100],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => '商城ID',
- 'order_id' => '订单ID',
- 'order_no' => '订单编号',
- 'user_id' => '用户ID',
- 'type' => '结算类型:1出单奖励,2加权平分',
- 'level' => '结算时用户的服务商等级',
- 'amounts' => '结算的总金额,单位:元',
- 'commission' => '结算的佣金,单位:元',
- 'settlement_config' => '结算时的配置',
- 'settlement_data' => '结算时的数据',
- 'is_settlement' => '是否已结算【0否,1是】',
- 'date' => '数据生成日期',
- 'period_id' => '分红期数ID',
- 'status' => '状态[-1:删除;0:禁用;1启用]',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- ];
- }
- /**
- * 关联用户表
- * @Author: lun
- * @DateTime: 2022/1/26 0026 15:57
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @return \yii\db\ActiveQuery
- */
- public function getUser()
- {
- return $this->hasOne(User::class, ['id' => 'user_id']);
- }
- }
|