xhUserCapital.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhUserCapital".
  5. *
  6. * @property int $id
  7. * @property int $userId 用户id
  8. * @property string $alipayId 支付宝用户id
  9. * @property int $merchantId 商家id
  10. * @property string $relateId 关联id
  11. * @property int $capitalType 流水订单的类型 参考configDict capitalType
  12. * @property int $operateId 操作人id adminId 等
  13. * @property string $balance 余额
  14. * @property string $amount 金额
  15. * @property int $io 收支类型0支出 1收入
  16. * @property string $totalIncome 累计收入
  17. * @property string $totalExpend 累计支出
  18. * @property int $payWay 资金收支方式0微信1支付宝2余额3现金,具体请查看配置文件configDict payWay
  19. * @property string $event 事项,说明,类型的具体解释
  20. * @property string $userName 用户名
  21. * @property string $remark 备注
  22. * @property int $addTime 添加时间,时间戳格式
  23. * @property string $createTime 创建时间
  24. * @property string $updateTime
  25. */
  26. class xhUserCapital extends xhBaseModel
  27. {
  28. /**
  29. * @inheritdoc
  30. */
  31. public static function tableName()
  32. {
  33. return 'xhUserCapital';
  34. }
  35. /**
  36. * @inheritdoc
  37. */
  38. public function rules()
  39. {
  40. return [
  41. [['userId', 'merchantId', 'capitalType', 'operateId', 'io', 'payWay', 'addTime'], 'integer'],
  42. [['balance', 'amount', 'totalIncome', 'totalExpend'], 'number'],
  43. [['createTime'], 'required'],
  44. [['createTime', 'updateTime'], 'safe'],
  45. [['alipayId', 'event', 'userName'], 'string', 'max' => 50],
  46. [['relateId'], 'string', 'max' => 100],
  47. [['remark'], 'string', 'max' => 500],
  48. ];
  49. }
  50. /**
  51. * @inheritdoc
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. 'id' => 'ID',
  57. 'userId' => 'User ID',
  58. 'alipayId' => 'Alipay ID',
  59. 'merchantId' => 'Merchant ID',
  60. 'relateId' => 'Relate ID',
  61. 'capitalType' => 'Capital Type',
  62. 'operateId' => 'Operate ID',
  63. 'balance' => 'Balance',
  64. 'amount' => 'Amount',
  65. 'io' => 'Io',
  66. 'totalIncome' => 'Total Income',
  67. 'totalExpend' => 'Total Expend',
  68. 'payWay' => 'Pay Way',
  69. 'event' => 'Event',
  70. 'userName' => 'User Name',
  71. 'remark' => 'Remark',
  72. 'addTime' => 'Add Time',
  73. 'createTime' => 'Create Time',
  74. 'updateTime' => 'Update Time',
  75. ];
  76. }
  77. }