xhUserDeduct.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "xhUserDeduct".
  6. *
  7. * @property string $id
  8. * @property integer $userId
  9. * @property integer $merchantId
  10. * @property string $amount
  11. * @property integer $classify
  12. * @property string $event
  13. * @property string $remark
  14. * @property integer $status
  15. * @property string $createTime
  16. * @property string $updateTime
  17. */
  18. class xhUserDeduct extends xhBaseModel
  19. {
  20. /**
  21. * @inheritdoc
  22. */
  23. public static function tableName()
  24. {
  25. return 'xhUserDeduct';
  26. }
  27. /**
  28. * @inheritdoc
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['id', 'createTime'], 'required'],
  34. [['userId', 'merchantId', 'classify', 'status'], 'integer'],
  35. [['amount'], 'number'],
  36. [['createTime', 'updateTime'], 'safe'],
  37. [['id'], 'string', 'max' => 100],
  38. [['event'], 'string', 'max' => 20],
  39. [['remark'], 'string', 'max' => 1000],
  40. [['id'], 'unique'],
  41. ];
  42. }
  43. /**
  44. * @inheritdoc
  45. */
  46. public function attributeLabels()
  47. {
  48. return [
  49. 'id' => 'ID',
  50. 'userId' => 'User ID',
  51. 'merchantId' => 'Merchant ID',
  52. 'amount' => 'Amount',
  53. 'classify' => 'Classify',
  54. 'event' => 'Event',
  55. 'remark' => 'Remark',
  56. 'status' => 'Status',
  57. 'createTime' => 'Create Time',
  58. 'updateTime' => 'Update Time',
  59. ];
  60. }
  61. }