UserIntegral.php 2.1 KB

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