OriginalCategoryModel.php 454 B

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