BossPoolPrizeCommissionLog.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. namespace addons\Boss\common\models;
  3. use common\models\user\User;
  4. use Yii;
  5. /**
  6. * This is the model class for table "{{%addons_boss_bonus_pool_commission_log}}".
  7. *
  8. * @property int $id ID
  9. * @property int $mall_id 商城ID
  10. * @property int $user_id 用户ID
  11. * @property int $boss_id 股东ID
  12. * @property float $total_amount 分红总额
  13. * @property float $total_performance 团队总业绩
  14. * @property float $personal_performance 个人团队业绩
  15. * @property int $num 分红人数
  16. * @property float $amount 分红金额
  17. * @property int $status 状态[-1删除;0禁用;1正常]
  18. * @property string $start_at 开始时间
  19. * @property string $end_at 结算时间
  20. * @property int $billing_cycle 结算周期
  21. * @property int $created_at 创建时间
  22. * @property int $updated_at 更新时间
  23. * @property int $job_id 任务ID
  24. */
  25. class BossPoolPrizeCommissionLog extends \common\models\base\BaseActiveRecord
  26. {
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public static function tableName()
  31. {
  32. return '{{%addons_boss_pool_prize_commission_log}}';
  33. }
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function rules()
  38. {
  39. return [
  40. [['mall_id', 'user_id', 'num', 'status', 'billing_cycle', 'created_at', 'updated_at', 'boss_id', 'job_id'], 'integer'],
  41. [['total_amount', 'total_performance', 'personal_performance', 'amount'], 'number'],
  42. [['start_at', 'end_at',], 'string']
  43. ];
  44. }
  45. /**
  46. * {@inheritdoc}
  47. */
  48. public function attributeLabels()
  49. {
  50. return [
  51. 'id' => 'ID',
  52. 'mall_id' => '商城ID',
  53. 'user_id' => '用户ID',
  54. 'boss_id' => '股东ID',
  55. 'total_amount' => '分红总额',
  56. 'total_performance' => '团队总业绩',
  57. 'personal_performance' => '个人团队业绩',
  58. 'num' => '分红人数',
  59. 'amount' => '分红金额',
  60. 'status' => '状态[-1删除;0禁用;1正常]',
  61. 'start_at' => '开始时间',
  62. 'end_at' => '结算时间',
  63. 'billing_cycle' => '结算周期',
  64. 'created_at' => '创建时间',
  65. 'updated_at' => '更新时间',
  66. 'job_id' => '任务ID',
  67. ];
  68. }
  69. public function getUser()
  70. {
  71. return $this->hasOne(User::class, ['id' => 'user_id']);
  72. }
  73. }