HappinessWeightPoolLog.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. namespace addons\Happiness\common\models;
  3. use common\enums\StatusEnum;
  4. use common\models\mall\MallAddons;
  5. use common\models\user\User;
  6. use Yii;
  7. /**
  8. * This is the model class for table "{{%addons_weight_bonus_pool_log}}".
  9. *
  10. * @property int $id ID
  11. * @property int $mall_id 商城ID
  12. * @property int $user_id 用户ID
  13. * @property float $total_amount 分红池总额
  14. * @property int $num 分红人数
  15. * @property float $amount 可获得分红金额
  16. * @property float $scale 营业分红比例
  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. * @property string $remark 备注
  25. */
  26. class HappinessWeightPoolLog extends \common\models\base\BaseActiveRecord
  27. {
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public static function tableName()
  32. {
  33. return '{{%addons_happiness_weight_pool_log}}';
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function rules()
  39. {
  40. return [
  41. [['mall_id', 'user_id', 'num', 'status', 'billing_cycle', 'created_at', 'updated_at', 'job_id'], 'integer'],
  42. [['total_amount', 'amount','scale'], 'number'],
  43. [['start_at', 'end_at','remark'], 'string']
  44. ];
  45. }
  46. /**
  47. * {@inheritdoc}
  48. */
  49. public function attributeLabels()
  50. {
  51. return [
  52. 'id' => 'ID',
  53. 'mall_id' => '商城ID',
  54. 'user_id' => '用户ID',
  55. 'total_amount' => '分红总额',
  56. 'num' => '分红人数',
  57. 'amount' => '可获得分红金额',
  58. 'scale'=>'分红比例',
  59. 'status' => '状态[-1删除;0禁用;1正常]',
  60. 'start_at' => '开始时间',
  61. 'end_at' => '结算时间',
  62. 'billing_cycle' => '结算周期',
  63. 'created_at' => '创建时间',
  64. 'updated_at' => '更新时间',
  65. 'job_id' => '任务ID',
  66. 'remark' => '备注',
  67. ];
  68. }
  69. public function getUser()
  70. {
  71. return $this->hasOne(User::class, ['id' => 'user_id']);
  72. }
  73. }