<?php

namespace app\common\repositories\product;

use app\common\dao\product\ShareDao;
use app\common\repositories\BaseRepository;
use app\entity\data\product\ShareEntity;

class ShareRepository extends BaseRepository
{
    public function __construct(ShareDao $dao)
    {
        $this->dao = $dao;
    }

    /**
     * @param int $shareId
     * @return ShareEntity
     */
    public function getShareEntityByShareId(int $shareId): ShareEntity
    {
        /** @var ShareEntity $shareEntity */
        $shareEntity = $this->dao->getShareEntityByShareId($shareId);
        return $shareEntity;
    }
}