| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace app\common\repositories\douhuomall;
- use app\common\dao\douhuomall\DouhuomallChangeLogDao;
- use app\common\repositories\BaseRepository;
- use app\entity\data\douhuomall\DouhuomallChangeLogEntity;
- class DouhuomallChangeLogRepository extends BaseRepository
- {
- protected $dao;
- /**
- * DouhuomallChangeLogRepository constructor.
- * @param DouhuomallChangeLogDao $dao
- */
- public function __construct(DouhuomallChangeLogDao $dao)
- {
- $this->dao = $dao;
- }
- public function create($data)
- {
- return $this->dao->create($data);
- }
- /**
- * @param DouhuomallChangeLogEntity $douhuomallChangeLogEntity
- * @return DouhuomallChangeLogEntity
- */
- public function createByEntity(DouhuomallChangeLogEntity $douhuomallChangeLogEntity): DouhuomallChangeLogEntity
- {
- $result = $this->create($douhuomallChangeLogEntity->toUnderlineArray())->toArray();
- /** @var DouhuomallChangeLogEntity $entity */
- $entity = DouhuomallChangeLogEntity::newInstance($result);
- return $entity;
- }
- }
|