This commit is contained in:
as2252258@163.com
2021-03-24 01:24:02 +08:00
parent 3bbabd2767
commit 94818ee71f
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace Snowflake\Core;
class No
{
/**
* @param int $userId
* @return string
*/
public static function order(int $userId): string
{
$explode = current(explode(' ', str_replace('0.', '', microtime())));
return 'No.' . sprintf('%09d', $userId) . '.' . date('Ymd.His') . '.' . $explode;
}
}