| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- namespace addons\Achievement\common\models;
- use common\enums\StatusEnum;
- use common\models\base\BaseActiveRecord;
- use common\models\mall\MallAddons;
- use common\models\user\User;
- use common\models\common\Download;
- use common\enums\DownloadEnum;
- use common\components\export\CsvTool;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_achievement_award_log".
- *
- * @property int $id
- * @property int $mall_id
- * @property int $grant_id 发放规则日志id
- * @property int $user_id 用户id
- * @property float $achievement_sum 总业绩
- * @property float $team_achievement 团队业绩
- * @property float $personal_achievement 个人业绩
- * @property float $award_proportion 奖励比例
- * @property float $award_money 奖励金额
- * @property int|null $is_settlement 是否已结算打款 1:是
- * @property int|null $is_skip_settlement 是否不结算 0:否 1:是
- * @property int|null $is_end 是否结束周期:1:是
- * @property float|null $award_sum 奖励总计
- * @property int|null $parent_team 父级团长id
- * @property float|null $proportion_money 比例结算金额
- * @property float|null $actual_money 实际应该结算金额
- * @property int $created_at
- * @property int $updated_at
- * @property int $status 状态[-1:删除;0:禁用;1启用]
- */
- class AchievementAwardLogUpdateLog extends BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_achievement_award_log_update_log';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'grant_id', 'award_id', 'created_at', 'updated_at', 'status'], 'integer'],
- [['before_award_money', 'after_award_money'], 'number'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'grant_id' => '发放规则日志id',
- 'award_id' => '奖励明细id',
- 'before_award_money' => '修改前奖励金额',
- 'after_award_money' => '修改后奖励金额',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- 'status' => '状态[-1:删除;0:禁用;1启用]',
- ];
- }
- public static function setData(array $params) {
- try {
- $model = new self();
- $model->loadDefaultValues();
- if (!$model->load($params, '')) throw new \Exception($model->getErrorMessage());
- if (!$model->save()) throw new \Exception($model->getErrorMessage());
- return $model;
- } catch (\Exception $e) {
- self::$static_error = $e->getMessage();
- return false;
- }
- }
- }
|