AgentBind.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. use yii\behaviors\TimestampBehavior;
  10. use yii\db\ActiveRecord;
  11. /**
  12. * This is the model class for table "{{%agent_bind}}".
  13. *
  14. * @property integer $id
  15. * @property integer $type
  16. * @property integer $admin_id
  17. * @property integer $parent_admin_id
  18. * @property integer $is_delete
  19. * @property integer $created_at
  20. * @property integer $updated_at
  21. */
  22. class AgentBind extends \yii\db\ActiveRecord
  23. {
  24. /**
  25. * @inheritdoc
  26. */
  27. public static function tableName()
  28. {
  29. return '{{%agent_bind}}';
  30. }
  31. public function behaviors()
  32. {
  33. return [
  34. [
  35. 'class' => TimestampBehavior::class,
  36. 'attributes' => [
  37. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  38. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  39. ]
  40. ]
  41. ];
  42. }
  43. /**
  44. * @inheritdoc
  45. */
  46. public function rules()
  47. {
  48. return [
  49. [['id', 'type', 'admin_id', 'parent_admin_id', 'is_delete', 'created_at', 'updated_at'], 'integer']
  50. ];
  51. }
  52. }