AppletSiteVersion.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\model\applet;
  12. use core\base\BaseModel;
  13. use think\model\relation\HasOne;
  14. /**
  15. * 小程序包 站点版本模型
  16. */
  17. class AppletSiteVersion extends BaseModel
  18. {
  19. /**
  20. * 数据表主键
  21. * @var string
  22. */
  23. protected $pk = 'id';
  24. /**
  25. * 模型名称
  26. * @var string
  27. */
  28. protected $name = 'applet_site_version';
  29. /**
  30. * 版本主表
  31. * @return HasOne
  32. */
  33. public function appletVersion()
  34. {
  35. return $this->hasOne(AppletVersion::class, 'id', 'version_id')->joinType('left')
  36. ->withField('desc, status, version, version_num, release_version')
  37. ->bind(['desc', 'status', 'version', 'version_num', 'release_version']);
  38. }
  39. }