SuperSalesUser.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace app\models;
  3. use app\modules\client\models\OrderComplete;
  4. use app\utils\OrderNo;
  5. use yii\behaviors\TimestampBehavior;
  6. use yii\db\ActiveRecord;
  7. use yii\helpers\ArrayHelper;
  8. /**
  9. * @property integer $id
  10. * @property integer $store_id
  11. * @property integer $user_id
  12. * @property integer $parent_user_id
  13. * @property float $direct_award
  14. * @property float $group_award
  15. * @property float $price
  16. * @property string $created_at
  17. * @property string $updated_at
  18. */
  19. class SuperSalesUser extends \yii\db\ActiveRecord
  20. {
  21. /**
  22. * @inheritdoc
  23. */
  24. public static function tableName()
  25. {
  26. return '{{%super_sales_user}}';
  27. }
  28. public function behaviors()
  29. {
  30. return [
  31. [
  32. 'class' => TimestampBehavior::class
  33. ]
  34. ];
  35. }
  36. public function rules()
  37. {
  38. return [
  39. [['id', 'store_id', 'user_id', 'parent_user_id'], 'integer'],
  40. [['created_at', 'updated_at'], 'string'],
  41. [['direct_award', 'group_award', 'price'], 'number']
  42. ];
  43. }
  44. public function attributeLabels()
  45. {
  46. return [
  47. 'id' => '',
  48. 'store_id' => '商城ID',
  49. 'user_id' => '用户ID',
  50. 'parent_user_id' => '',
  51. 'direct_award' => '直推奖',
  52. 'group_award' => '成团/分红奖',
  53. 'price' => '累计佣金',
  54. 'created_at' => '',
  55. 'updated_at' => ''
  56. ];
  57. }
  58. }