SaasShareRelation.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. use yii\behaviors\TimestampBehavior;
  10. use Yii;
  11. /**
  12. * This is the model class for table "{{%saas_share_relation}}".
  13. *
  14. * @property int $store_id
  15. * @property int $user_id
  16. * @property int $parent_store_id
  17. * @property int $parent_user_id
  18. * @property int $created_at
  19. */
  20. class SaasShareRelation extends \yii\db\ActiveRecord
  21. {
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public static function tableName()
  26. {
  27. return '{{%saas_share_relation}}';
  28. }
  29. public function behaviors()
  30. {
  31. return [
  32. [
  33. 'class' => TimestampBehavior::class,
  34. 'attributes' => [
  35. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  36. ]
  37. ]
  38. ];
  39. }
  40. /**
  41. * {@inheritdoc}
  42. */
  43. public function rules()
  44. {
  45. return [
  46. [['store_id', 'user_id', 'parent_user_id', 'parent_store_id', 'created_at'], 'integer'],
  47. ];
  48. }
  49. /**
  50. * {@inheritdoc}
  51. */
  52. public function attributeLabels()
  53. {
  54. return [
  55. 'store_id' => 'Store ID',
  56. 'user_id' => 'user_id',
  57. 'parent_user_id' => 'parent_user_id',
  58. 'parent_store_id' => 'parent_store_id',
  59. 'created_at' => 'Add Time',
  60. ];
  61. }
  62. }