✏️ 正在编辑: CorretorAssinaturaTermo.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/models/CorretorAssinaturaTermo.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Model_CorretorAssinaturaTermo { /** @var Model_DbTable_CorretorAssinaturaTermo */ private $table; public function __construct() { $this->table = table('corretor-assinatura'); } /** * @param array $data * @return int */ public function save(array $data): int { if (!empty($data['id'])) { return $this->table->update($data, 'id = ' . $data['id']); } return $this->table->insert($data); } /** * @param int|null $corretor * @param string|null $uuid * @return array */ public function getByCorretorId(?int $corretor, ?string $uuid = null): array { return $this->table->findByCorretorId($corretor, $uuid); } /** * @param int $corretor * @return mixed */ public function hasAssinaturaPendente(int $corretor, string $email): bool { return $this->table->findAssinaturaPendente($corretor, $email); } /** * @param int $corretor * @return array */ public function getTermoAssinado(int $corretor): array { return $this->table->findTermoAssinado($corretor); } /** * @param array $data * @return int */ public function delete(string $uuid): int { return $this->table->delete(['uuid = ?' => $uuid]); } }
💾 保存文件
← 返回文件管理器