xhMerchantCapital.php 2.8 KB

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