AddonsBossPerformanceLog.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace addons\Boss\common\models;
  3. use common\enums\StatusEnum;
  4. use Yii;
  5. use yii\db\Exception;
  6. /**
  7. * This is the model class for table "{{%addons_boss_performance_log}}".
  8. *
  9. * @property int $id
  10. * @property int $mall_id 商城ID
  11. * @property int $order_id 订单ID
  12. * @property string $order_no 订单编号
  13. * @property int $user_id 用户ID
  14. * @property int $level 计算业绩时的股东等级
  15. * @property float $performance 业绩,单位:元
  16. * @property string|null $order_detail_ids 参与业绩计算的商品订单
  17. * @property int $is_settlement 是否已结算【0否,1是】
  18. * @property int $date 数据生成日期
  19. * @property int|null $status 状态[-1:删除;0:禁用;1启用]
  20. * @property int $created_at
  21. * @property int $updated_at
  22. */
  23. class AddonsBossPerformanceLog extends \common\models\base\BaseActiveRecord
  24. {
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%addons_boss_performance_log}}';
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function rules()
  36. {
  37. return [
  38. [['mall_id', 'order_id', 'user_id', 'level', 'is_settlement', 'date', 'status', 'created_at', 'updated_at'], 'integer'],
  39. [['performance'], 'number'],
  40. [['order_detail_ids'], 'string'],
  41. [['order_no'], 'string', 'max' => 100],
  42. ];
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function attributeLabels()
  48. {
  49. return [
  50. 'id' => 'ID',
  51. 'mall_id' => '商城ID',
  52. 'order_id' => '订单ID',
  53. 'order_no' => '订单编号',
  54. 'user_id' => '用户ID',
  55. 'level' => '计算业绩时的股东等级',
  56. 'performance' => '这笔订单股东获得的业绩',
  57. 'commission' => '结算的佣金,单位:元',
  58. 'settlement_config' => '结算时的配置',
  59. 'settlement_data' => '结算时的数据',
  60. 'is_settlement' => '是否已结算【0否,1是】',
  61. 'date' => '数据生成日期',
  62. 'status' => '状态[-1:删除;0:禁用;1启用]',
  63. 'created_at' => '创建时间',
  64. 'updated_at' => '更新时间',
  65. ];
  66. }
  67. }