xhUserIntegral.php 2.4 KB

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