UserWalletCoin.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. use yii\behaviors\TimestampBehavior;
  10. /**
  11. * This is the model class for table "{{%user_wallet_coin}}".
  12. *
  13. * @property integer $id ID
  14. * @property integer $store_id 店铺id
  15. * @property integer $user_id 用户id
  16. * @property integer $saas_id 联盟id
  17. * @property integer $cloud_user_id 供应商id
  18. * @property string $money 余额
  19. * @property string $money_total 余额总金额
  20. * @property string $frozen 冻结
  21. * @property string $withdraw 提现
  22. * @property string $currency_code 业务货币代码
  23. * @property integer $created_at
  24. * @property integer $updated_at
  25. * @property integer $currency_yewu_id 业务主键id
  26. * @property integer $currency_id 币种主键id
  27. * @property integer $is_status
  28. * @property string $user_percent
  29. * @property string $agent_percent
  30. * @property integer $is_open 币种账户是否开启
  31. * @property string $recommend_percent
  32. * @property string $store_percent
  33. * @property string $store_recommend_percent
  34. * @property string $pay_percent
  35. * @property string $huifu_id
  36. * @property integer $shop_status 商城开关
  37. * @property string $shop_user_percent
  38. * @property string $shop_agent_percent
  39. */
  40. class UserWalletCoin extends \yii\db\ActiveRecord
  41. {
  42. /**
  43. * @inheritdoc
  44. */
  45. public static function tableName()
  46. {
  47. return '{{%user_wallet_coin}}';
  48. }
  49. public function behaviors()
  50. {
  51. return [
  52. [
  53. 'class' => TimestampBehavior::class,
  54. 'attributes' => [
  55. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'],
  56. ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
  57. ]
  58. ]
  59. ];
  60. }
  61. /**
  62. * @inheritdoc
  63. */
  64. public function rules()
  65. {
  66. return [
  67. [['store_id', 'user_id', 'saas_id', 'cloud_user_id', 'currency_yewu_id', 'currency_id', 'is_status', 'is_open', 'shop_status'], 'integer'],
  68. [['money', 'money_total', 'frozen', 'withdraw', 'user_percent', 'agent_percent', 'recommend_percent', 'store_percent', 'store_recommend_percent', 'pay_percent', 'shop_user_percent', 'shop_agent_percent'], 'number'],
  69. [['currency_code'], 'string', 'max' => 50],
  70. [['huifu_id'], 'string', 'max' => 255],
  71. [['created_at', 'updated_at'], 'safe']
  72. ];
  73. }
  74. }