QueueAccountLog.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. use app\modules\admin\models\wechat_mp\CardForm;
  11. use app\utils\IotCloudHelper;
  12. /**
  13. * This is the model class for table "{{%account_log}}".
  14. *
  15. * @property integer $id
  16. * @property integer $store_id
  17. * @property integer $order_type
  18. * @property integer $order_id
  19. * @property integer $user_id
  20. * @property integer $amount
  21. * @property string $desc
  22. * @property integer $before
  23. * @property integer $after
  24. * @property string $operator
  25. * @property integer $operator_id
  26. * @property integer $log_type
  27. * @property integer $type
  28. * @property integer $operator_type
  29. * @property string $pic_url
  30. * @property string $explain
  31. * @property integer $created_at
  32. * @property integer $from
  33. * @property integer $from_user_id
  34. * @property integer $profit
  35. * @property integer $saas_id
  36. * @property integer $queue_id
  37. * @property integer $from_queue_id
  38. */
  39. class QueueAccountLog extends \yii\db\ActiveRecord
  40. {
  41. /**
  42. * 收入类型
  43. */
  44. CONST LOG_TYPE_INCOME = 1;
  45. /**
  46. * 支出类型
  47. */
  48. CONST LOG_TYPE_EXPEND = 2;
  49. /**
  50. * 余额
  51. */
  52. CONST TYPE_BALANCE = 2;
  53. /**
  54. * 积分
  55. */
  56. CONST TYPE_INTEGRAL = 1;
  57. /**
  58. * 微信
  59. */
  60. CONST TYPE_WECHAT = 3;
  61. /**
  62. * 支付宝
  63. */
  64. CONST TYPE_ALIPAY = 4;
  65. public static $valid_type = [
  66. self::TYPE_BALANCE,
  67. self::TYPE_INTEGRAL,
  68. self::TYPE_WECHAT,
  69. self::TYPE_ALIPAY
  70. ];
  71. /**
  72. * @inheritdoc
  73. */
  74. public static function tableName()
  75. {
  76. return '{{%queue_account_log}}';
  77. }
  78. /**
  79. * @inheritdoc
  80. */
  81. public function rules()
  82. {
  83. return [
  84. [['user_id', 'type', 'amount', 'desc', 'before', 'after',
  85. 'log_type', 'type'], 'required'],
  86. [['user_id', 'type', 'created_at', 'order_id', 'log_type', 'saas_id', 'from_queue_id', 'queue_id'
  87. ], 'integer'],
  88. [['amount', 'before', 'after'], 'number'],
  89. [['desc'], 'string'],
  90. ];
  91. }
  92. /**
  93. * @inheritdoc
  94. */
  95. public function attributeLabels()
  96. {
  97. return [
  98. 'id' => 'ID',
  99. 'user_id' => 'User ID',
  100. 'log_type' => '类型:1=收入,2=支出',
  101. 'type' => '类型:2=余额,1=积分',
  102. 'amount' => '变动数',
  103. 'desc' => '变动说明',
  104. 'before' => '变动前',
  105. 'after' => '变动后',
  106. 'pic_url' => '图片',
  107. 'created_at' => '添加时间',
  108. 'order_id' => '订单ID',
  109. 'from' => '是否为转增',
  110. 'saas_id' => '联盟用户',
  111. 'from_queue_id' => '来源队列',
  112. 'queue_id' => '队列',
  113. ];
  114. }
  115. }