You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
548 B

  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: zhengmingwei
  5. * Date: 2020/1/6
  6. * Time: 9:45 下午
  7. */
  8. namespace addons\unishop\extend;
  9. class Snowflake extends \Godruoyi\Snowflake\Snowflake
  10. {
  11. /**
  12. * Snowflake constructor.
  13. * @param int $datacenter 数据中心id
  14. * @param int $workerid 机器id
  15. * @throws \Exception
  16. */
  17. public function __construct(int $datacenter = 1, int $workerid = 1)
  18. {
  19. parent::__construct($datacenter, $workerid);
  20. self::setStartTimeStamp(strtotime('2020-01-01')*1000);
  21. }
  22. }