SaasProfitCash.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\behaviors\TimestampBehavior;
  9. /**
  10. * Class SaasProfitCash
  11. * @package app\models
  12. * @property integer $id
  13. * @property string $mobile
  14. * @property integer $user_id
  15. * @property integer $amount
  16. * @property integer $order_no
  17. * @property integer $status
  18. * @property string $refuse_reason
  19. * @property integer $is_delete
  20. * @property integer $is_pay
  21. * @property integer $pay_time
  22. * @property integer $created_at
  23. * @property integer $updated_at
  24. * @property string $account_name
  25. * @property string $account
  26. * @property string $bank
  27. * @property integer $type
  28. * @property double $service_money
  29. * @property double $before_price
  30. * @property double $after_price
  31. */
  32. class SaasProfitCash extends \yii\db\ActiveRecord
  33. {
  34. const CASH_STATUS_WAIT = 0;
  35. const CASH_STATUS_PASS = 1;
  36. const CASH_STATUS_FAIL = 2;
  37. /**
  38. * 是否删除
  39. */
  40. const DELETE_STATUS_TRUE = 1;
  41. /**
  42. * 是否删除
  43. */
  44. const DELETE_STATUS_FALSE = 0;
  45. /**
  46. * @inheritdoc
  47. */
  48. public static function tableName()
  49. {
  50. return '{{%saas_profit_cash}}';
  51. }
  52. public function behaviors()
  53. {
  54. return [
  55. [
  56. // 自动更新创建和更新时间
  57. 'class' => TimestampBehavior::class,
  58. 'value' => time()
  59. ]
  60. ];
  61. }
  62. /**
  63. * @inheritdoc
  64. */
  65. public function rules()
  66. {
  67. return [
  68. [['mobile', 'refuse_reason', 'order_no', 'account_name', 'account', 'bank'], 'string'],
  69. [['mobile', 'refuse_reason', 'order_no'], 'trim'],
  70. [['id', 'user_id', 'status', 'is_delete', 'created_at', 'updated_at', 'is_pay', 'pay_time', 'type'], 'integer'],
  71. [['amount', 'service_money', 'before_price', 'after_price'], 'number'],
  72. [['created_at', 'update_at'], 'safe']
  73. ];
  74. }
  75. /**
  76. * @inheritdoc
  77. */
  78. public function attributeLabels()
  79. {
  80. return [
  81. 'id' => 'ID',
  82. 'user_id' => 'user id',
  83. 'mobile' => '手机号',
  84. 'amount' => '金额',
  85. 'order_no' => '订单号',
  86. 'status' => '状态,0:待审核,1:审核通过,2:审核失败',
  87. 'refuse_reason' => '拒绝原因',
  88. 'is_pay' => '支付状态',
  89. 'pay_time' => '支付时间',
  90. 'created_at' => '创建时间',
  91. 'updated_at' => '更新时间',
  92. 'is_delete' => '是否已删除',
  93. 'type' => "提现类型",
  94. 'account_name' => '账户名',
  95. 'account' => '账户',
  96. 'bank' => '银行'
  97. ];
  98. }
  99. }