Share.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. /**
  10. * This is the model class for table "{{%share}}".
  11. *
  12. * @property integer $id
  13. * @property integer $user_id
  14. * @property string $mobile
  15. * @property string $name
  16. * @property integer $status
  17. * @property integer $is_delete
  18. * @property integer $created_at
  19. * @property integer $updated_at
  20. * @property integer $store_id
  21. * @property string $seller_comments
  22. * @property integer $level
  23. */
  24. class Share extends \yii\db\ActiveRecord
  25. {
  26. /**
  27. * @inheritdoc
  28. */
  29. public static function tableName()
  30. {
  31. return '{{%share}}';
  32. }
  33. /**
  34. * 删除状态
  35. */
  36. CONST SHARE_IS_DELETE = 1;
  37. CONST SHARE_NOT_DELETE = 0;
  38. /**
  39. * 审核状态
  40. */
  41. CONST SHARE_NO_AUDIT = 0;
  42. CONST SHARE_AUDIT_PASS = 1;
  43. CONST SHARE_AUDIT_FAIL = 2;
  44. /**
  45. * @inheritdoc
  46. */
  47. public function rules()
  48. {
  49. return [
  50. [['user_id', 'status', 'store_id'], 'required'],
  51. [['user_id', 'status', 'is_delete', 'created_at', 'store_id', 'updated_at', 'level'], 'integer'],
  52. [['mobile', 'name'], 'string', 'max' => 255],
  53. [['seller_comments'], 'string'],
  54. ];
  55. }
  56. /**
  57. * @inheritdoc
  58. */
  59. public function attributeLabels()
  60. {
  61. return [
  62. 'id' => 'ID',
  63. 'user_id' => 'User ID',
  64. 'mobile' => 'Mobile',
  65. 'name' => 'Name',
  66. 'status' => '审核状态 0--未审核 1--审核通过 2--审核不通过',
  67. 'is_delete' => 'Is Delete',
  68. 'created_at' => 'create time',
  69. 'updated_at' => 'update time',
  70. 'store_id' => '商城id',
  71. 'seller_comments' => '备注',
  72. 'level' => '等级'
  73. ];
  74. }
  75. }