UsdtTypeModel.php 433 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * usdt类型模型
  4. */
  5. declare (strict_types=1);
  6. namespace App\Model;
  7. class UsdtTypeModel extends BaseModel
  8. {
  9. protected $table = 'usdt_type';
  10. /**
  11. * UUID 键名
  12. * @var string
  13. */
  14. protected $uuidKeyName = 'uid';
  15. /**
  16. * 钩子函数 数据创建后
  17. */
  18. public function created()
  19. {
  20. $this->{$this->uuidKeyName} = hashEncodeId($this->id);
  21. $this->save();
  22. }
  23. }