{"id":481309,"date":"2026-05-27T19:15:43","date_gmt":"2026-05-27T19:15:43","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=481309"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=481309","title":{"rendered":"UUID \u043c\u0435\u0440\u0442\u0432? \u0414\u0430 \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0435\u0442 Smart ID! \u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0433\u043e"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u043a\u0440\u0443\u043f\u043d\u043e\u0439 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041c\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u043f\u0443\u0442\u044c \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e UUID, ULID \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432. \u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 ID \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430.  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435: \u041f\u0440\u043e\u043a\u043b\u044f\u0442\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u0430<\/h2>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u0434\u0438\u043b\u0435\u043c\u043c\u043e\u0439: \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430?<\/p>\n<pre><code class=\"php\">\/\/ \u0412\u0430\u0440\u0438\u0430\u043d\u0442 1: \u0421\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442$table-&gt;id(); \/\/ 1, 2, 3...\/\/ \u0412\u0430\u0440\u0438\u0430\u043d\u0442 2: \u041c\u043e\u0434\u043d\u044b\u0439 UUID$table-&gt;uuid('id')-&gt;primary(); \/\/ 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d\/\/ \u0412\u0430\u0440\u0438\u0430\u043d\u0442 3: \u0425\u0430\u0439\u043f\u043e\u0432\u044b\u0439 ULID  $table-&gt;ulid('id')-&gt;primary(); \/\/ 01HXYZ1234ABC5678DEF90GH<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0431\u0435\u0440\u0438 \u043d\u043e\u0432\u043e\u0435 \u2014 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0430\u0441\u0442\u044c\u0435. \u041d\u043e\u00a0<strong>\u0434\u044c\u044f\u0432\u043e\u043b \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445<\/strong>.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0435\u0439\u0441: \u041c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430<\/h2>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u0441\u0435\u0442\u0438 \u043a\u043b\u0438\u043d\u0438\u043a \u0441:<\/p>\n<ul>\n<li>\n<p>1000+ \u0432\u0440\u0430\u0447\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>100000+ \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>1M+ \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0433\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0438\u043b\u0438\u0430\u043b\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<h3>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0422\u0417:<\/h3>\n<ol>\n<li>\n<p><strong>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f<\/strong>\u00a0(\u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435)<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u043d\u0435\u0441\u0430\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/strong>\u00a0(\u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0433\u0430\u0434\u0430\u0442\u044c ID)<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/strong>\u00a0(\u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445)<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438<\/strong>\u00a0(\u0441 1\u0421, CRM)<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong>\u00a0(\u043e\u0441\u043e\u0431\u0430\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c)<\/p>\n<\/li>\n<\/ol>\n<h2>\u041c\u044b\u0441\u043b\u044c 1: \u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/h2>\n<h3>1.1 \u0410\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 (INT)<\/h3>\n<pre><code class=\"php\">Schema::create('doctors', function (Blueprint $table) {    $table-&gt;id(); \/\/ 1, 2, 3, 4, 5...});<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u2705 \u041f\u043b\u044e\u0441\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c<\/strong>: JOIN-\u044b \u043b\u0435\u0442\u0430\u044e\u0442 (4 \u0431\u0430\u0439\u0442\u0430, B-Tree \u0438\u043d\u0434\u0435\u043a\u0441\u044b)<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c<\/strong>:\u00a0<code>\/doctor\/123<\/code>\u00a0\u2014 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430<\/strong>: \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043c\u0430\u0433\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u043c\u0435\u0440<\/strong>: \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439<\/p>\n<\/li>\n<\/ul>\n<h4>\u274c \u041c\u0438\u043d\u0443\u0441\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/strong>: ID \u043c\u043e\u0436\u043d\u043e \u0443\u0433\u0430\u0434\u0430\u0442\u044c<\/p>\n<\/li>\n<li>\n<p><strong>\u0428\u0430\u0440\u0434\u0438\u043d\u0433<\/strong>: \u0441\u043b\u043e\u0436\u043d\u043e \u043c\u0435\u0440\u0436\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0441\u0442\u044c<\/strong>: \u0432\u0438\u0434\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0442 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438<\/strong>: \u0432\u0441\u0435 ID \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412\u0435\u0440\u0434\u0438\u043a\u0442<\/strong>: \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u043f\u0440\u043e\u0432\u0430\u043b \u043f\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<hr\/>\n<h3>1.2 UUID v4 (\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439)<\/h3>\n<pre><code class=\"php\">Schema::create('doctors', function (Blueprint $table) {    $table-&gt;uuid('id')-&gt;primary(); \/\/ 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d});<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u2705 \u041f\u043b\u044e\u0441\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong>: \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e, \u0445\u043e\u0442\u044c \u043d\u0430 \u041c\u0430\u0440\u0441\u0435<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/strong>: \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0433\u0430\u0434\u0430\u0442\u044c<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/strong>: \u043c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0444\u043b\u0430\u0439\u043d<\/p>\n<\/li>\n<\/ul>\n<h4>\u274c \u041c\u0438\u043d\u0443\u0441\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c<\/strong>: JOIN-\u044b \u0432 7 \u0440\u0430\u0437 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (16 \u0431\u0430\u0439\u0442, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f)<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c<\/strong>:\u00a0<code>\/doctor\/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d<\/code>\u00a0\u2014 \u044d\u0442\u043e \u043f\u044b\u0442\u043a\u0430<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u043c\u0435\u0440<\/strong>: \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0440\u0430\u0437\u0434\u0443\u0442\u044b<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043b\u0430\u0434\u043a\u0430<\/strong>: &#171;\u043d\u0430\u0439\u0434\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0441 ID 9b1d&#8230;&#187; \u2014 \u0441\u043f\u0430\u0441\u0438\u0431\u043e, \u043d\u0435 \u043d\u0430\u0434\u043e<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412\u0435\u0440\u0434\u0438\u043a\u0442<\/strong>: \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u043d\u043e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.<\/p>\n<hr\/>\n<h3>1.3 ULID (\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 UUID)<\/h3>\n<pre><code class=\"php\">Schema::create('doctors', function (Blueprint $table) {    $table-&gt;ulid('id')-&gt;primary(); \/\/ 01HXYZ1234ABC5678DEF90GH});<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u2705 \u041f\u043b\u044e\u0441\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c<\/strong>: \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435 UUID<\/strong>: 26 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e 36<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong>: \u043a\u0430\u043a \u0443 UUID<\/p>\n<\/li>\n<\/ul>\n<h4>\u274c \u041c\u0438\u043d\u0443\u0441\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c<\/strong>: \u0432\u0441\u0435 \u0435\u0449\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432\u0441\u0435 \u0435\u0449\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c<\/strong>: \u0447\u0443\u0442\u044c \u043b\u0443\u0447\u0448\u0435 UUID, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 &#171;\u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0430\u044f \u0433\u0440\u0430\u043c\u043e\u0442\u0430&#187;<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432\u0440\u0430\u0447 \u044d\u0442\u043e \u0438\u043b\u0438 \u043f\u0430\u0446\u0438\u0435\u043d\u0442<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412\u0435\u0440\u0434\u0438\u043a\u0442<\/strong>: \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0435\u0434, \u043d\u043e \u043d\u0435 \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u044f.<\/p>\n<hr\/>\n<h3>1.4 UUID v7 (\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)<\/h3>\n<pre><code class=\"php\">Schema::create('doctors', function (Blueprint $table) {    $table-&gt;uuid('id')-&gt;primary(); \/\/ 018f0c6d-8a3b-7c4d-9e5f-2b0d7b3dcb6d});<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u2705 \u041f\u043b\u044e\u0441\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c<\/strong>: \u043a\u0430\u043a \u0443 ULID<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442<\/strong>: \u0447\u0430\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 UUID<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u0443\u0434\u0443\u0449\u0435\u0435<\/strong>: MySQL 13+ \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442<\/p>\n<\/li>\n<\/ul>\n<h4>\u274c \u041c\u0438\u043d\u0443\u0441\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c<\/strong>: \u0432\u0441\u0435 \u0442\u0435 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0442\u0440\u043e\u043a<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c<\/strong>: \u043d\u0438\u043a\u0430\u043a\u043e\u0439<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412\u0435\u0440\u0434\u0438\u043a\u0442<\/strong>: \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e.<\/p>\n<hr\/>\n<h2>\u00a0\u041c\u044b\u0441\u043b\u044c 2: \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0442\u0435\u0441\u0442 \u0441 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438 1000 JOIN-\u043e\u0432:<\/p>\n<pre><code class=\"sql\">-- \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441SELECT * FROM appointments JOIN doctors ON doctors.id = appointments.doctor_idWHERE appointments.created_at &gt; NOW() - INTERVAL 30 DAY;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0422\u0438\u043f \u043a\u043b\u044e\u0447\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0420\u0430\u0437\u043c\u0435\u0440 PK<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f JOIN<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0420\u0430\u0437\u043c\u0435\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>INT<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">4 \u0431\u0430\u0439\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.05 \u0441\u0435\u043a<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">40 MB<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0438\u0437\u043a\u0430\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>ULID<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">16 \u0431\u0430\u0439\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.35 \u0441\u0435\u043a (7x)<\/p>\n<\/td>\n<td>\n<p align=\"left\">160 MB<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b\u0441\u043e\u043a\u0430\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>UUID v4<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">16 \u0431\u0430\u0439\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.40 \u0441\u0435\u043a (8x)<\/p>\n<\/td>\n<td>\n<p align=\"left\">160 MB<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0430\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>UUID v7<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">16 \u0431\u0430\u0439\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.30 \u0441\u0435\u043a (6x)<\/p>\n<\/td>\n<td>\n<p align=\"left\">160 MB<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0440\u0435\u0434\u043d\u044f\u044f<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0412\u044b\u0432\u043e\u0434<\/strong>: INT \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u043f\u043e\u0431\u0435\u0434\u0438\u043c \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ol>\n<li>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/strong>: \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 UUID \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u044e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u044d\u0448\u0430<\/strong>: \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438<\/p>\n<\/li>\n<li>\n<p><strong>I\/O \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/strong>: \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0442\u0435\u043d\u0438\u0439 \u0441 \u0434\u0438\u0441\u043a\u0430<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h2>\u00a0\u041c\u044b\u0441\u043b\u044c 3: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435:<\/p>\n<h3>UUID \u043f\u043e\u0434\u0445\u043e\u0434:<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">ID<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0418\u043c\u044f<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0422\u0438\u043f<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u0432\u0430\u043d\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">?<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0435\u0442\u0440\u043e\u0432\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">?<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">018f0c6d-8a3b-7c4d-9e5f-2b0d7b3dcb6d<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0438\u0434\u043e\u0440\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">?<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0412\u043e\u043f\u0440\u043e\u0441<\/strong>: \u041a\u0442\u043e \u0438\u0437 \u043d\u0438\u0445 \u0432\u0440\u0430\u0447, \u043a\u0442\u043e \u043f\u0430\u0446\u0438\u0435\u043d\u0442, \u043a\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044c? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e,\u00a0<strong>\u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u044c<\/strong>!<\/p>\n<h3>\u041d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 (\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0437\u0436\u0435):<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">ID<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0418\u043c\u044f<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0422\u0438\u043f<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\ud83d\udc68\u200d\u2695\ufe0f <strong>DOC-1001<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u0432\u0430\u043d\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0440\u0430\u0447<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\ud83e\uddd1 <strong>PAT-4001<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0435\u0442\u0440\u043e\u0432\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0430\u0446\u0438\u0435\u043d\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\ud83d\udcc5 <strong>APP-5001<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u043f\u0438\u0441\u044c 20.03<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u0435\u043c<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e!<\/strong>\u00a0\u0427\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u043b\u0430\u0437 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0437\u0430 0.1 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<hr\/>\n<h2>\u00a0\u041c\u044b\u0441\u043b\u044c 4: \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c vs \u0423\u0434\u043e\u0431\u0441\u0442\u0432\u043e<\/h2>\n<p>UUID \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0414\u0432\u0430 \u043c\u0438\u0440\u0430<\/h3>\n<pre><code class=\"php\">\/\/ \u041c\u0438\u0440 \u0411\u0414: \u043d\u0443\u0436\u043d\u044b \u0447\u0438\u0441\u043b\u0430 \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438$db-&gt;join('doctor_id', 1001); \/\/ \u0431\u044b\u0441\u0442\u0440\u043e!\/\/ \u041c\u0438\u0440 URL: \u043d\u0443\u0436\u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c$url = '\/doctor\/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'; \/\/ \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\/\/ \u041c\u0438\u0440 \u0430\u0434\u043c\u0438\u043d\u043a\u0438: \u043d\u0443\u0436\u043d\u0430 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044cecho $doctor-&gt;id; \/\/ \"9b1deb4d...\" \u2014 \u0430\u0434\u043c\u0438\u043d \u0432 \u0441\u043b\u0435\u0437\u0430\u0445<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 UUID \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0441\u0440\u0430\u0437\u0443?<\/h3>\n<ul>\n<li>\n<p><strong>\u041e\u0434\u043d\u043e \u043f\u043e\u043b\u0435<\/strong>\u00a0\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441<\/strong>\u00a0\u043d\u0435\u0438\u0437\u0431\u0435\u0436\u0435\u043d<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0442\u043e-\u0442\u043e<\/strong>\u00a0\u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u0434\u043e\u0432\u043e\u043b\u0435\u043d<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h2>\u00a0\u041c\u044b\u0441\u043b\u044c  5: \u0420\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u0434\u0435\u0438 \u2014 \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438\u00a0<strong>\u043d\u0435 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u0432 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435<\/strong>?<\/p>\n<h3>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f: \u0422\u0440\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u043c\u0438\u0440\u043e\u0432<\/h3>\n<pre><code class=\"php\">class Doctor extends Model{    \/\/ \u041c\u0438\u0440 \u0411\u0414: INT \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438    protected $primaryKey = 'id'; \/\/ 1001        \/\/ \u041c\u0438\u0440 URL: HASH \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438    protected $appends = ['hash']; \/\/ \"DOC-a1b2c3d4\"        \/\/ \u041c\u0438\u0440 \u0430\u0434\u043c\u0438\u043d\u043a\u0438: READABLE_ID \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439    protected $appends = ['readable_id']; \/\/ \"DOC-1001\"}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0432 \u0411\u0414:<\/h3>\n<pre><code class=\"sql\">CREATE TABLE doctors (    id INT PRIMARY KEY AUTO_INCREMENT,  -- 4 \u0431\u0430\u0439\u0442\u0430, \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0435\u0439    hash VARCHAR(32) UNIQUE,            -- \u0434\u043b\u044f URL    full_name VARCHAR(255),              -- \u0434\u0430\u043d\u043d\u044b\u0435    -- \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 ID \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e    readable_id VARCHAR(20) GENERATED ALWAYS AS (CONCAT('DOC-', id)) VIRTUAL);ALTER TABLE doctors AUTO_INCREMENT = 1000; -- \u0421\u0434\u0432\u0438\u0433 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0430<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<hr\/>\n<h2>\u00a0\u041c\u044b\u0441\u043b\u044c 6: \u0413\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u043c\u0438<\/h2>\n<p>\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u0440\u043e\u0440\u044b\u0432 \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u00a0<strong>\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b<\/strong>:<\/p>\n<pre><code class=\"php\">\/\/ \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432return [    'doctors' =&gt; [        'prefix' =&gt; 'DOC',        'range_start' =&gt; 1000,        'range_end' =&gt; 1999,        'color' =&gt; 'blue',        'icon' =&gt; '\ud83d\udc68\u200d\u2695\ufe0f',    ],    'patients' =&gt; [        'prefix' =&gt; 'PAT',        'range_start' =&gt; 4000,        'range_end' =&gt; 4999,        'color' =&gt; 'purple',        'icon' =&gt; '\ud83e\uddd1',    ],    'appointments' =&gt; [        'prefix' =&gt; 'APP',        'range_start' =&gt; 5000,        'range_end' =&gt; 5999,        'color' =&gt; 'red',        'icon' =&gt; '\ud83d\udcc5',    ],];<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e?<\/h3>\n<ol>\n<li>\n<p><strong>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: DOC \u2014 \u0432\u0440\u0430\u0447, PAT \u2014 \u043f\u0430\u0446\u0438\u0435\u043d\u0442<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0432 \u0411\u0414<\/strong>: \u0432\u0441\u0435 \u0432\u0440\u0430\u0447\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441<\/strong>: \u0434\u0430\u0436\u0435 \u0437\u043d\u0430\u044f ID, \u043d\u0435 \u0437\u043d\u0430\u0435\u0448\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441<\/p>\n<\/li>\n<li>\n<p><strong>\u0426\u0432\u0435\u0442\u043e\u0432\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>: \u0432 UI \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>: \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h2>\u00a0\u041c\u044b\u0441\u043b\u044c 7: \u0425\u044d\u0448\u0438 \u2014 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0441\u0442\u0435\u0440\u043e\u0438\u0434\u0430\u0445<\/h2>\n<p>\u0414\u043b\u044f URL \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u044d\u0448, \u0430\u00a0<strong>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u0445\u044d\u0448<\/strong>:<\/p>\n<pre><code class=\"php\">trait HasHashid{    public function getHashAttribute(): string    {        \/\/ \u0420\u0430\u0437\u043d\u044b\u0435 \u0441\u043e\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446!        return Hashids::connection($this-&gt;getTable())            -&gt;encode($this-&gt;id);    }        public function getRouteKeyName()    {        return 'hash'; \/\/ \u0412 URL \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u044d\u0448    }}\/\/ doctor::findByHash('DOC-a1b2c3d4') \u2014 \u043d\u0430\u0439\u0434\u0435\u0442\/\/ patient::findByHash('DOC-a1b2c3d4') \u2014 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442 (\u0434\u0440\u0443\u0433\u0430\u044f \u0441\u043e\u043b\u044c)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:<\/h3>\n<ul>\n<li>\n<p><strong>\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0433\u0430\u0434\u0430\u0442\u044c<\/strong>: \u0445\u044d\u0448 \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 URL<\/strong>:\u00a0<code>\/doctor\/DOC-a1b2c3d4<\/code>\u00a0\u0432\u043c\u0435\u0441\u0442\u043e UUID<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0437\u043c<\/strong>: \u043e\u0434\u0438\u043d ID = \u043e\u0434\u0438\u043d \u0445\u044d\u0448 (\u043a\u044d\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f)<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u0435\u0437 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439<\/strong>: \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u043e\u043b\u0438<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h2>\u00a0\u041c\u044b\u0441\u043b\u044c 8: \u041f\u043e\u043b\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/h2>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439<\/p>\n<\/th>\n<th>\n<p align=\"left\">INT<\/p>\n<\/th>\n<th>\n<p align=\"left\">UUID v4<\/p>\n<\/th>\n<th>\n<p align=\"left\">ULID<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c JOIN<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83d\ude80 \u0411\u044b\u0441\u0442\u0440\u043e<\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83d\udc22 \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e<\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83d\udc22 \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e<\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83d\ude80 \u0411\u044b\u0441\u0442\u0440\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c URL<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u274c \u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u0414\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u0414\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u0414\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">DOC-1001<\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83e\udd37\u200d\u2642\ufe0f 9b1deb&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83e\udd14 01HXYZ&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83d\udc51 DOC-1001<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u274c \u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u274c \u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u274c \u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 DOC\/PAT\/APP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u274c \u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u274c \u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u274c \u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0420\u0430\u0437\u043c\u0435\u0440 PK<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">4 \u0431\u0430\u0439\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">16 \u0431\u0430\u0439\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">16 \u0431\u0430\u0439\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">4 \u0431\u0430\u0439\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0428\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443<\/p>\n<\/td>\n<td>\n<p align=\"left\">Consistent hash<\/p>\n<\/td>\n<td>\n<p align=\"left\">Consistent hash<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041e\u0442\u043b\u0430\u0434\u043a\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u041b\u0435\u0433\u043a\u043e<\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83d\ude2b \u041a\u043e\u0448\u043c\u0430\u0440<\/p>\n<\/td>\n<td>\n<p align=\"left\">\ud83d\ude2b \u041a\u043e\u0448\u043c\u0430\u0440<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u041b\u0435\u0433\u043a\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041c\u0435\u0440\u0436 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u043b\u0438\u0437\u0438\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u0411\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u0411\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2705 \u041f\u0440\u0435\u0444\u0438\u043a\u0441\u044b<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<hr\/>\n<h2>\u00a0\u041c\u044b\u0441\u043b\u044c  9: \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0430\u0448 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u0437\u044b\u0440\u044c<\/h2>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0434\u0443\u043c\u0430\u044e\u0442: &#171;UUID \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c&#187;. \u041d\u043e \u043d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434\u00a0<strong>\u043b\u0443\u0447\u0448\u0435<\/strong>!<\/p>\n<h3>\u0423\u043c\u043d\u044b\u0439 ID \u0434\u043b\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438:<\/h3>\n<pre><code class=\"php\">\/\/ ID = \u0420\u0415\u0413\u0418\u041e\u041d + TIMESTAMP + RANDOM\/\/ \u041c\u043e\u0441\u043a\u0432\u0430:   01 + 20240320 + 1234 = 01202403201234\/\/ \u041f\u0438\u0442\u0435\u0440:    02 + 20240320 + 5678 = 02202403205678\/\/ \u041b\u043e\u043d\u0434\u043e\u043d:   03 + 20240320 + 9012 = 03202403209012\/\/ \u041f\u0440\u0438 \u043c\u0435\u0440\u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0445:$allDoctors = collect([    ['id' =&gt; 01202403201234, 'name' =&gt; '\u0418\u0432\u0430\u043d\u043e\u0432', 'region' =&gt; 'MSK'],    ['id' =&gt; 02202403205678, 'name' =&gt; '\u041f\u0435\u0442\u0440\u043e\u0432', 'region' =&gt; 'SPB'],]);\/\/ \u0421\u0440\u0430\u0437\u0443 \u0437\u043d\u0430\u0435\u043c:$region = substr($doctor-&gt;id, 0, 2);   \/\/ 01 = \u041c\u043e\u0441\u043a\u0432\u0430$date = substr($doctor-&gt;id, 2, 8);      \/\/ 20240320<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u0435\u0440\u0435\u0434 UUID:<\/h3>\n<ol>\n<li>\n<p><strong>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0440\u0434\u0438\u043d\u0433<\/strong>: \u043f\u0440\u0435\u0444\u0438\u043a\u0441 = \u043d\u043e\u043c\u0435\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430<\/strong>: timestamp \u0432\u043d\u0443\u0442\u0440\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u0437\u043d\u0430\u0435\u043c \u0442\u0438\u043f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f<\/strong>: \u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h2> \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<h3>\u0422\u0440\u0435\u0439\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439:<\/h3>\n<pre><code class=\"php\">trait HasSmartIdentifiers{    public static function bootHasSmartIdentifiers()    {        static::creating(function ($model) {            if (empty($model-&gt;hash)) {                $model-&gt;hash = $model-&gt;generateHash();            }        });    }        public function generateHash(): string    {        $prefix = config(\"id-prefixes.{$this-&gt;getTable()}.prefix\");        $salted = $prefix . $this-&gt;id . config('app.key');                return $prefix . substr(md5($salted), 0, 16);    }        public function getReadableIdAttribute(): string    {        $prefix = config(\"id-prefixes.{$this-&gt;getTable()}.prefix\");        return \"{$prefix}-{$this-&gt;id}\";    }        public function getRouteKeyName()    {        return 'hash';    }        public function scopeWhereIdentifier($query, $identifier)    {        if (preg_match('\/^[A-Z]{3}-\\d+$\/', $identifier)) {            $id = substr($identifier, 4);            return $query-&gt;where('id', $id);        }                if (preg_match('\/^[A-Z]{3}[a-f0-9]{16}$\/', $identifier)) {            return $query-&gt;where('hash', $identifier);        }                if (is_numeric($identifier)) {            return $query-&gt;where('id', $identifier);        }                return $query-&gt;where('hash', $identifier);    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438:<\/h3>\n<pre><code class=\"php\">class Doctor extends Model{    use HasSmartIdentifiers;        protected $fillable = ['full_name'];    protected $appends = ['readable_id'];}\/\/ \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435$doctor = Doctor::create(['name' =&gt; '\u0418\u0432\u0430\u043d\u043e\u0432']); \/\/ id = 1001, hash = \"DOCa1b2c3d4e5f6g7h8\"\/\/ \u0412\u0435\u0437\u0434\u0435:$doctor-&gt;readable_id; \/\/ \"DOC-1001\" \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u043a\u0438$doctor-&gt;hash;        \/\/ \"DOCa1b2c3d4\" \u0434\u043b\u044f URL$doctor-&gt;id;          \/\/ 1001 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0435\u0439\/\/ \u041f\u043e\u0438\u0441\u043a \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443:Doctor::whereIdentifier('DOC-1001')-&gt;first();Doctor::whereIdentifier('DOCa1b2c3d4')-&gt;first();Doctor::whereIdentifier(1001)-&gt;first();<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<hr\/>\n<h2> \u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<h3>Artisan \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:<\/h3>\n<pre><code class=\"php\">class CheckIdRanges extends Command{    public function handle()    {        foreach (IdPrefix::all() as $prefix) {            $used = DB::table($prefix-&gt;table_name)-&gt;count();            $total = $prefix-&gt;range_end - $prefix-&gt;range_start + 1;            $percent = ($used \/ $total) * 100;                        $this-&gt;info(\"{$prefix-&gt;icon} {$prefix-&gt;prefix}: {$used}\/{$total} ({$percent}%)\");                        if ($percent &gt; 90) {                $this-&gt;warn(\"\u26a0\ufe0f \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0441\u043a\u043e\u0440\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f!\");                                \/\/ \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435                $newEnd = $prefix-&gt;range_end + ($total);                $prefix-&gt;update(['range_end' =&gt; $newEnd]);                $this-&gt;info(\"\u2705 \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d \u0434\u043e {$newEnd}\");            }        }    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0440\u043e\u0441\u0442\u0430:<\/h3>\n<pre><code class=\"php\">\/\/ \u041f\u0440\u043e\u0433\u043d\u043e\u0437 \u043d\u0430 10 \u043b\u0435\u0442 \u0432\u043f\u0435\u0440\u0435\u0434$growthRate = $this-&gt;getGrowthRate($table);$daysLeft = ($total - $used) \/ $growthRate;$this-&gt;info(\"\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043d\u0435\u0439: \" . round($daysLeft));<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<hr\/>\n<h2> \u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0442 \u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445?<\/h2>\n<p><strong>\u0412\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0437\u0430\u0434\u0430\u0434\u0438\u0442\u0435<\/strong>: &#171;\u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a \u043a\u0440\u0443\u0442\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430?&#187;<\/p>\n<h3>\u041e\u0442\u0432\u0435\u0442:<\/h3>\n<ol>\n<li>\n<p><strong>\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u0431\u0438\u0432\u0430\u0435\u0442 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c<\/strong><\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u0432\u043e\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0430\u043a\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u043e\u043c\u0430\u0435\u0442 ID, \u043b\u043e\u043c\u0430\u0435\u0442 \u0431\u0438\u0437\u043d\u0435\u0441<\/p>\n<\/li>\n<li>\n<p>\u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u042d\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439<\/strong><\/p>\n<ul>\n<li>\n<p>INT \u2192 UUID \u2192 ULID \u2192 UUID v7 \u2192 ?<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u044f \u0435\u0449\u0435 \u0438\u0449\u0435\u0442 \u0438\u0434\u0435\u0430\u043b<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/strong><\/p>\n<ul>\n<li>\n<p>70% \u043a\u043e\u0434\u0430 \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u2014 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0438 \u0441\u043a\u0435\u043b\u0435\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u043d\u0435\u0442 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr\/>\n<h2><\/h2>\n<h2>\u0427\u0442\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438:<\/h2>\n<pre><code>\u0410\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 (1980) \u2192 UUID (2005) \u2192 ULID (2016) \u2192 \u041d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 (2024)     \u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430            \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c       \u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c      \u0423\u043c\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441     \u041d\u043e \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e      \u041d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e        \u041d\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0435\u043c\u043e       \u0411\u044b\u0441\u0442\u0440\u043e, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u0447\u0438\u0442\u0430\u0435\u043c\u043e<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u044d\u0442\u043e \u0433\u0438\u0431\u0440\u0438\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0440\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0435:<\/h3>\n<p>\u2705\u00a0<strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c INT<\/strong>\u00a0\u2014 4 \u0431\u0430\u0439\u0442\u0430, \u0431\u044b\u0441\u0442\u0440\u044b\u0435 JOIN-\u044b<br \/>\u2705\u00a0<strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c UUID<\/strong>\u00a0\u2014 \u0445\u044d\u0448\u0438 \u0432 URL<br \/>\u2705\u00a0<strong>\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c ULID<\/strong>\u00a0\u2014 \u043f\u043e ID \u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<br \/>\u2705\u00a0<strong>\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u0432<\/strong>\u00a0\u2014 DOC-1001 vs \u0430\u0431\u0440\u0430\u043a\u0430\u0434\u0430\u0431\u0440\u0430<br \/>\u2705\u00a0<strong>\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>\u00a0\u2014 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u043d\u043e \u0442\u0438\u043f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438<br \/>\u2705\u00a0<strong>\u0428\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>\u00a0\u2014 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0432 ID<br \/>\u2705\u00a0<strong>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/strong>\u00a0\u2014 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<br \/>\u2705\u00a0<strong>\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>\u00a0\u2014 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0440\u0430\u0441\u0442\u0443\u0442<\/p>\n<h3>\u0414\u043b\u044f \u043a\u043e\u0433\u043e \u044d\u0442\u043e:<\/h3>\n<ul>\n<li>\n<p><strong>CRM \u0438 ERP \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/strong>\u00a0\u2014 \u0433\u0434\u0435 \u043c\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/strong>\u00a0\u2014 \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u0434\u043c\u0438\u043d\u043a\u0438<\/strong>\u00a0\u2014 \u0433\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043b\u044e\u0434\u0438<\/p>\n<\/li>\n<li>\n<p><strong>API<\/strong>\u00a0\u2014 \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 URL<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u044e\u0431\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0435\u043a\u0442<\/strong>\u00a0\u2014 \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<h3>\u0414\u043b\u044f \u043a\u043e\u0433\u043e UUID \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0443\u0436\u0435\u043d:<\/h3>\n<ul>\n<li>\n<p><strong>\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b<\/strong>\u00a0\u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0435\u0439<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0444\u043b\u0430\u0439\u043d-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f<\/strong>\u00a0\u0432 \u043f\u043e\u043b\u0435\u0432\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u043b\u043e\u043a\u0447\u0435\u0439\u043d<\/strong>\u00a0\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0435\u0441\u0442\u0440\u044b<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h2>\u00a0\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: \u041c\u044b\u0441\u043b\u044c \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435<\/h2>\n<p><strong>UUID \u043c\u0435\u0440\u0442\u0432?<\/strong>\u00a0\u041d\u0435\u0442, \u043d\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<p>\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0430\u00a0<strong>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/strong>. \u041d\u0435 \u043f\u044b\u0442\u0430\u0439\u0442\u0435\u0441\u044c \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u0432 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435. \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><strong>ID<\/strong>\u00a0\u2014 \u0434\u043b\u044f \u0411\u0414 \u0438 \u0441\u0432\u044f\u0437\u0435\u0439<\/p>\n<\/li>\n<li>\n<p><strong>HASH<\/strong>\u00a0\u2014 \u0434\u043b\u044f URL \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p><strong>PREFIX<\/strong>\u00a0\u2014 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439 \u0438 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>RANGE<\/strong>\u00a0\u2014 \u0434\u043b\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041c\u044b \u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u043b\u0438 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u041c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447.<\/strong>\u00a0\ud83d\udeb2<\/p>\n<hr\/>\n<h2>\u00a0\u0411\u043e\u043d\u0443\u0441: \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0430\u043a\u0435\u0442<\/h2>\n<pre><code class=\"bash\">composer require artisan-arch\/smart-id<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"php\">\/\/ config\/smart-id.phpreturn [    'models' =&gt; [        Doctor::class =&gt; [            'prefix' =&gt; 'DOC',            'range_start' =&gt; 1000,            'hash_driver' =&gt; 'hashids',            'color' =&gt; 'blue',            'icon' =&gt; '\ud83d\udc68\u200d\u2695\ufe0f',        ],    ],];\/\/ \u0412 \u043c\u043e\u0434\u0435\u043b\u0438class Doctor extends Model{    use ArtisanArch\\SmartId\\HasSmartId;}\/\/ \u0413\u043e\u0442\u043e\u0432\u043e!$doctor-&gt;sid;        \/\/ \"DOC-jR5kL9\" (system id)$doctor-&gt;hash;       \/\/ \"jR5kL9\"$doctor-&gt;readable;   \/\/ \"DOC-1001\"\/\/ \u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433php artisan smart-id:checkphp artisan smart-id:expand<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<hr\/>\n<h2>\u00a0\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>\u042d\u0442\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0432 \u0441\u043f\u043e\u0440\u0435 \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u0442\u0430\u0438\u0432\u0430\u043b \u043d\u0430 UUID. \u0422\u0440\u0438 \u0434\u043d\u044f \u043c\u043e\u0437\u0433\u043e\u0432\u043e\u0433\u043e \u0448\u0442\u0443\u0440\u043c\u0430, \u0442\u043e\u043d\u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u2014\u00a0<strong>\u0440\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e \u043d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e<\/strong>.<\/p>\n<p><strong>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432 \u0441\u0432\u043e\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u0435\u0440\u043d\u0435\u0442\u0435\u0441\u044c \u043a UUID.<\/strong><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1040334\/\">https:\/\/habr.com\/ru\/articles\/1040334\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u043a\u0440\u0443\u043f\u043d\u043e\u0439 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041c\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u043f\u0443\u0442\u044c \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e UUID, ULID \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432. \u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 ID \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430.  \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435: \u041f\u0440\u043e\u043a\u043b\u044f\u0442\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u0430\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u0434\u0438\u043b\u0435\u043c\u043c\u043e\u0439: \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430?\/\/ \u0412\u0430\u0440\u0438\u0430\u043d\u0442 1: \u0421\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442$table-&gt;id(); \/\/ 1, 2, 3&#8230;\/\/ \u0412\u0430\u0440\u0438\u0430\u043d\u0442 2: \u041c\u043e\u0434\u043d\u044b\u0439 UUID$table-&gt;uuid(&#8216;id&#8217;)-&gt;primary(); \/\/ 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d\/\/ \u0412\u0430\u0440\u0438\u0430\u043d\u0442 3: \u0425\u0430\u0439\u043f\u043e\u0432\u044b\u0439 ULID  $table-&gt;ulid(&#8216;id&#8217;)-&gt;primary(); \/\/ 01HXYZ1234ABC5678DEF90GH\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0431\u0435\u0440\u0438 \u043d\u043e\u0432\u043e\u0435 \u2014 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0430\u0441\u0442\u044c\u0435. \u041d\u043e\u00a0\u0434\u044c\u044f\u0432\u043e\u043b \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445.\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0435\u0439\u0441: \u041c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u0441\u0435\u0442\u0438 \u043a\u043b\u0438\u043d\u0438\u043a \u0441:1000+ \u0432\u0440\u0430\u0447\u0435\u0439100000+ \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u04321M+ \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0433\u043e\u0434\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0438\u043b\u0438\u0430\u043b\u0430\u043c\u0438\u0412\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0422\u0417:\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u00a0(\u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435)\u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u043d\u0435\u0441\u0430\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u00a0(\u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0433\u0430\u0434\u0430\u0442\u044c ID)\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u00a0(\u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445)\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438\u00a0(\u0441 1\u0421, CRM)\u041c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\u00a0(\u043e\u0441\u043e\u0431\u0430\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c)\u041c\u044b\u0441\u043b\u044c 1: \u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u04391.1 \u0410\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 (INT)Schema::create(&#8216;doctors&#8217;, function (Blueprint $table) {    $table-&gt;id(); \/\/ 1, 2, 3, 4, 5&#8230;});\u2705 \u041f\u043b\u044e\u0441\u044b:\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c: JOIN-\u044b \u043b\u0435\u0442\u0430\u044e\u0442 (4 \u0431\u0430\u0439\u0442\u0430, B-Tree \u0438\u043d\u0434\u0435\u043a\u0441\u044b)\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c:\u00a0\/doctor\/123\u00a0\u2014 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430: \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043c\u0430\u0433\u0438\u0438\u0420\u0430\u0437\u043c\u0435\u0440: \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439\u274c \u041c\u0438\u043d\u0443\u0441\u044b:\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c: ID \u043c\u043e\u0436\u043d\u043e \u0443\u0433\u0430\u0434\u0430\u0442\u044c\u0428\u0430\u0440\u0434\u0438\u043d\u0433: \u0441\u043b\u043e\u0436\u043d\u043e \u043c\u0435\u0440\u0436\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0441\u0442\u044c: \u0432\u0438\u0434\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439\u041d\u0435\u0442 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438: \u0432\u0441\u0435 ID \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0412\u0435\u0440\u0434\u0438\u043a\u0442: \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u043f\u0440\u043e\u0432\u0430\u043b \u043f\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.1.2 UUID v4 (\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439)Schema::create(&#8216;doctors&#8217;, function (Blueprint $table) {    $table-&gt;uuid(&#8216;id&#8217;)-&gt;primary(); \/\/ 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d});\u2705 \u041f\u043b\u044e\u0441\u044b:\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e, \u0445\u043e\u0442\u044c \u043d\u0430 \u041c\u0430\u0440\u0441\u0435\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c: \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0433\u0430\u0434\u0430\u0442\u044c\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u043c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0444\u043b\u0430\u0439\u043d\u274c \u041c\u0438\u043d\u0443\u0441\u044b:\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c: JOIN-\u044b \u0432 7 \u0440\u0430\u0437 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (16 \u0431\u0430\u0439\u0442, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f)\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c:\u00a0\/doctor\/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d\u00a0\u2014 \u044d\u0442\u043e \u043f\u044b\u0442\u043a\u0430\u0420\u0430\u0437\u043c\u0435\u0440: \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0440\u0430\u0437\u0434\u0443\u0442\u044b\u041e\u0442\u043b\u0430\u0434\u043a\u0430: &#171;\u043d\u0430\u0439\u0434\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0441 ID 9b1d&#8230;&#187; \u2014 \u0441\u043f\u0430\u0441\u0438\u0431\u043e, \u043d\u0435 \u043d\u0430\u0434\u043e\u0412\u0435\u0440\u0434\u0438\u043a\u0442: \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u043d\u043e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.1.3 ULID (\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 UUID)Schema::create(&#8216;doctors&#8217;, function (Blueprint $table) {    $table-&gt;ulid(&#8216;id&#8217;)-&gt;primary(); \/\/ 01HXYZ1234ABC5678DEF90GH});\u2705 \u041f\u043b\u044e\u0441\u044b:\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c: \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f\u041a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435 UUID: 26 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e 36\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: \u043a\u0430\u043a \u0443 UUID\u274c \u041c\u0438\u043d\u0443\u0441\u044b:\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c: \u0432\u0441\u0435 \u0435\u0449\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432\u0441\u0435 \u0435\u0449\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c: \u0447\u0443\u0442\u044c \u043b\u0443\u0447\u0448\u0435 UUID, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 &#171;\u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0430\u044f \u0433\u0440\u0430\u043c\u043e\u0442\u0430&#187;\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f: \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432\u0440\u0430\u0447 \u044d\u0442\u043e \u0438\u043b\u0438 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0412\u0435\u0440\u0434\u0438\u043a\u0442: \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0435\u0434, \u043d\u043e \u043d\u0435 \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u044f.1.4 UUID v7 (\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)Schema::create(&#8216;doctors&#8217;, function (Blueprint $table) {    $table-&gt;uuid(&#8216;id&#8217;)-&gt;primary(); \/\/ 018f0c6d-8a3b-7c4d-9e5f-2b0d7b3dcb6d});\u2705 \u041f\u043b\u044e\u0441\u044b:\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c: \u043a\u0430\u043a \u0443 ULID\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442: \u0447\u0430\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 UUID\u0411\u0443\u0434\u0443\u0449\u0435\u0435: MySQL 13+ \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u274c \u041c\u0438\u043d\u0443\u0441\u044b:\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c: \u0432\u0441\u0435 \u0442\u0435 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0442\u0440\u043e\u043a\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c: \u043d\u0438\u043a\u0430\u043a\u043e\u0439\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f: \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442\u0412\u0435\u0440\u0434\u0438\u043a\u0442: \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e.\u00a0\u041c\u044b\u0441\u043b\u044c 2: \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0442\u0435\u0441\u0442 \u0441 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438 1000 JOIN-\u043e\u0432:&#8212; \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441SELECT * FROM appointments JOIN doctors ON doctors.id = appointments.doctor_idWHERE appointments.created_at &gt; NOW() &#8212; INTERVAL 30 DAY;\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:\u0422\u0438\u043f \u043a\u043b\u044e\u0447\u0430\u0420\u0430\u0437\u043c\u0435\u0440 PK\u0412\u0440\u0435\u043c\u044f JOIN\u0420\u0430\u0437\u043c\u0435\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044fINT4 \u0431\u0430\u0439\u0442\u04300.05 \u0441\u0435\u043a40 MB\u041d\u0438\u0437\u043a\u0430\u044fULID16 \u0431\u0430\u0439\u04420.35 \u0441\u0435\u043a (7x)160 MB\u0412\u044b\u0441\u043e\u043a\u0430\u044fUUID v416 \u0431\u0430\u0439\u04420.40 \u0441\u0435\u043a (8x)160 MB\u041e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0430\u044fUUID v716 \u0431\u0430\u0439\u04420.30 \u0441\u0435\u043a (6x)160 MB\u0421\u0440\u0435\u0434\u043d\u044f\u044f\u0412\u044b\u0432\u043e\u0434: INT \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u043f\u043e\u0431\u0435\u0434\u0438\u043c \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432: \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 UUID \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u044e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e\u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u044d\u0448\u0430: \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438I\/O \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438: \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0442\u0435\u043d\u0438\u0439 \u0441 \u0434\u0438\u0441\u043a\u0430\u00a0\u041c\u044b\u0441\u043b\u044c 3: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435:UUID \u043f\u043e\u0434\u0445\u043e\u0434:ID\u0418\u043c\u044f\u0422\u0438\u043f9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d\u0418\u0432\u0430\u043d\u043e\u0432?a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p\u041f\u0435\u0442\u0440\u043e\u0432\u0430?018f0c6d-8a3b-7c4d-9e5f-2b0d7b3dcb6d\u0421\u0438\u0434\u043e\u0440\u043e\u0432?\u0412\u043e\u043f\u0440\u043e\u0441: \u041a\u0442\u043e \u0438\u0437 \u043d\u0438\u0445 \u0432\u0440\u0430\u0447, \u043a\u0442\u043e \u043f\u0430\u0446\u0438\u0435\u043d\u0442, \u043a\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044c? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e,\u00a0\u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u044c!\u041d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 (\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0437\u0436\u0435):ID\u0418\u043c\u044f\u0422\u0438\u043f\ud83d\udc68\u200d\u2695\ufe0f DOC-1001\u0418\u0432\u0430\u043d\u043e\u0432\u0412\u0440\u0430\u0447\ud83e\uddd1 PAT-4001\u041f\u0435\u0442\u0440\u043e\u0432\u0430\u041f\u0430\u0446\u0438\u0435\u043d\u0442\ud83d\udcc5 APP-5001\u0417\u0430\u043f\u0438\u0441\u044c 20.03\u041f\u0440\u0438\u0435\u043c\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e!\u00a0\u0427\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u043b\u0430\u0437 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0437\u0430 0.1 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.\u00a0\u041c\u044b\u0441\u043b\u044c 4: \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c vs \u0423\u0434\u043e\u0431\u0441\u0442\u0432\u043eUUID \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0414\u0432\u0430 \u043c\u0438\u0440\u0430\/\/ \u041c\u0438\u0440 \u0411\u0414: \u043d\u0443\u0436\u043d\u044b \u0447\u0438\u0441\u043b\u0430 \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438$db-&gt;join(&#8216;doctor_id&#8217;, 1001); \/\/ \u0431\u044b\u0441\u0442\u0440\u043e!\/\/ \u041c\u0438\u0440 URL: \u043d\u0443\u0436\u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c$url = &#8216;\/doctor\/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d&#8217;; \/\/ \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\/\/ \u041c\u0438\u0440 \u0430\u0434\u043c\u0438\u043d\u043a\u0438: \u043d\u0443\u0436\u043d\u0430 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044cecho $doctor-&gt;id; \/\/ &#171;9b1deb4d&#8230;&#187; \u2014 \u0430\u0434\u043c\u0438\u043d \u0432 \u0441\u043b\u0435\u0437\u0430\u0445\u041f\u043e\u0447\u0435\u043c\u0443 UUID \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0441\u0440\u0430\u0437\u0443?\u041e\u0434\u043d\u043e \u043f\u043e\u043b\u0435\u00a0\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451\u041a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u00a0\u043d\u0435\u0438\u0437\u0431\u0435\u0436\u0435\u043d\u041a\u0442\u043e-\u0442\u043e\u00a0\u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u0434\u043e\u0432\u043e\u043b\u0435\u043d\u00a0\u041c\u044b\u0441\u043b\u044c  5: \u0420\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u0434\u0435\u0438 \u2014 \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438\u00a0\u043d\u0435 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u0432 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435?\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f: \u0422\u0440\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u043c\u0438\u0440\u043e\u0432class Doctor extends Model{    \/\/ \u041c\u0438\u0440 \u0411\u0414: INT \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438    protected $primaryKey = &#8216;id&#8217;; \/\/ 1001        \/\/ \u041c\u0438\u0440 URL: HASH \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438    protected $appends = [&#8216;hash&#8217;]; \/\/ &#171;DOC-a1b2c3d4&#187;        \/\/ \u041c\u0438\u0440 \u0430\u0434\u043c\u0438\u043d\u043a\u0438: READABLE_ID \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439    protected $appends = [&#8216;readable_id&#8217;]; \/\/ &#171;DOC-1001&#187;}\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0432 \u0411\u0414:CREATE TABLE doctors (    id INT PRIMARY KEY AUTO_INCREMENT,  &#8212; 4 \u0431\u0430\u0439\u0442\u0430, \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0435\u0439    hash VARCHAR(32) UNIQUE,            &#8212; \u0434\u043b\u044f URL    full_name VARCHAR(255),              &#8212; \u0434\u0430\u043d\u043d\u044b\u0435    &#8212; \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 ID \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e    readable_id VARCHAR(20) GENERATED ALWAYS AS (CONCAT(&#8216;DOC-&#8216;, id)) VIRTUAL);ALTER TABLE doctors AUTO_INCREMENT = 1000; &#8212; \u0421\u0434\u0432\u0438\u0433 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0430\u00a0\u041c\u044b\u0441\u043b\u044c 6: \u0413\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u043c\u0438\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u0440\u043e\u0440\u044b\u0432 \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u00a0\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b:\/\/ \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432return [    &#8216;doctors&#8217; =&gt; [        &#8216;prefix&#8217; =&gt; &#8216;DOC&#8217;,        &#8216;range_start&#8217; =&gt; 1000,        &#8216;range_end&#8217; =&gt; 1999,        &#8216;color&#8217; =&gt; &#8216;blue&#8217;,        &#8216;icon&#8217; =&gt; &#8216;\ud83d\udc68\u200d\u2695\ufe0f&#8217;,    ],    &#8216;patients&#8217; =&gt; [        &#8216;prefix&#8217; =&gt; &#8216;PAT&#8217;,        &#8216;range_start&#8217; =&gt; 4000,        &#8216;range_end&#8217; =&gt; 4999,        &#8216;color&#8217; =&gt; &#8216;purple&#8217;,        &#8216;icon&#8217; =&gt; &#8216;\ud83e\uddd1&#8217;,    ],    &#8216;appointments&#8217; =&gt; [        &#8216;prefix&#8217; =&gt; &#8216;APP&#8217;,        &#8216;range_start&#8217; =&gt; 5000,        &#8216;range_end&#8217; =&gt; 5999,        &#8216;color&#8217; =&gt; &#8216;red&#8217;,        &#8216;icon&#8217; =&gt; &#8216;\ud83d\udcc5&#8217;,    ],];\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e?\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f: DOC \u2014 \u0432\u0440\u0430\u0447, PAT \u2014 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0432 \u0411\u0414: \u0432\u0441\u0435 \u0432\u0440\u0430\u0447\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441: \u0434\u0430\u0436\u0435 \u0437\u043d\u0430\u044f ID, \u043d\u0435 \u0437\u043d\u0430\u0435\u0448\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0426\u0432\u0435\u0442\u043e\u0432\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: \u0432 UI \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c\u00a0\u041c\u044b\u0441\u043b\u044c 7: \u0425\u044d\u0448\u0438 \u2014 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0441\u0442\u0435\u0440\u043e\u0438\u0434\u0430\u0445\u0414\u043b\u044f URL \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u044d\u0448, \u0430\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u0445\u044d\u0448:trait HasHashid{    public function getHashAttribute(): string    {        \/\/ \u0420\u0430\u0437\u043d\u044b\u0435 \u0441\u043e\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446!        return Hashids::connection($this-&gt;getTable())            -&gt;encode($this-&gt;id);    }        public function getRouteKeyName()    {        return &#8216;hash&#8217;; \/\/ \u0412 URL \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u044d\u0448    }}\/\/ doctor::findByHash(&#8216;DOC-a1b2c3d4&#8217;) \u2014 \u043d\u0430\u0439\u0434\u0435\u0442\/\/ patient::findByHash(&#8216;DOC-a1b2c3d4&#8217;) \u2014 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442 (\u0434\u0440\u0443\u0433\u0430\u044f \u0441\u043e\u043b\u044c)\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0433\u0430\u0434\u0430\u0442\u044c: \u0445\u044d\u0448 \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b\u041a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 URL:\u00a0\/doctor\/DOC-a1b2c3d4\u00a0\u0432\u043c\u0435\u0441\u0442\u043e UUID\u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0437\u043c: \u043e\u0434\u0438\u043d ID = \u043e\u0434\u0438\u043d \u0445\u044d\u0448 (\u043a\u044d\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f)\u0411\u0435\u0437 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439: \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u043e\u043b\u0438\u00a0\u041c\u044b\u0441\u043b\u044c 8: \u041f\u043e\u043b\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439INTUUID v4ULID\u041d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c JOIN\ud83d\ude80 \u0411\u044b\u0441\u0442\u0440\u043e\ud83d\udc22 \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\ud83d\udc22 \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\ud83d\ude80 \u0411\u044b\u0441\u0442\u0440\u043e\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c URL\u274c \u041d\u0435\u0442\u2705 \u0414\u0430\u2705 \u0414\u0430\u2705 \u0414\u0430\u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044cDOC-1001\ud83e\udd37\u200d\u2642\ufe0f 9b1deb&#8230;\ud83e\udd14 01HXYZ&#8230;\ud83d\udc51 DOC-1001\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f\u274c \u041d\u0435\u0442\u274c \u041d\u0435\u0442\u274c \u041d\u0435\u0442\u2705 DOC\/PAT\/APP\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430\u274c \u041d\u0435\u0442\u274c \u041d\u0435\u0442\u274c \u041d\u0435\u0442\u2705 \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b\u0420\u0430\u0437\u043c\u0435\u0440 PK4 \u0431\u0430\u0439\u0442\u043016 \u0431\u0430\u0439\u044216 \u0431\u0430\u0439\u04424 \u0431\u0430\u0439\u0442\u0430\u0428\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u041f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443Consistent hashConsistent hash\u041f\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0443\u041e\u0442\u043b\u0430\u0434\u043a\u0430\u2705 \u041b\u0435\u0433\u043a\u043e\ud83d\ude2b \u041a\u043e\u0448\u043c\u0430\u0440\ud83d\ude2b \u041a\u043e\u0448\u043c\u0430\u0440\u2705 \u041b\u0435\u0433\u043a\u043e\u041c\u0435\u0440\u0436 \u0434\u0430\u043d\u043d\u044b\u0445\u041a\u043e\u043b\u043b\u0438\u0437\u0438\u0438\u2705 \u0411\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u2705 \u0411\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u2705 \u041f\u0440\u0435\u0444\u0438\u043a\u0441\u044b\u00a0\u041c\u044b\u0441\u043b\u044c  9: \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0430\u0448 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u0437\u044b\u0440\u044c\u041c\u043d\u043e\u0433\u0438\u0435 \u0434\u0443\u043c\u0430\u044e\u0442: &#171;UUID \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c&#187;. \u041d\u043e \u043d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434\u00a0\u043b\u0443\u0447\u0448\u0435!\u0423\u043c\u043d\u044b\u0439 ID \u0434\u043b\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438:\/\/ ID = \u0420\u0415\u0413\u0418\u041e\u041d + TIMESTAMP + RANDOM\/\/ \u041c\u043e\u0441\u043a\u0432\u0430:   01 + 20240320 + 1234 = 01202403201234\/\/ \u041f\u0438\u0442\u0435\u0440:    02 + 20240320 + 5678 = 02202403205678\/\/ \u041b\u043e\u043d\u0434\u043e\u043d:   03 + 20240320 + 9012 = 03202403209012\/\/ \u041f\u0440\u0438 \u043c\u0435\u0440\u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0445:$allDoctors = collect([    [&#8216;id&#8217; =&gt; 01202403201234, &#8216;name&#8217; =&gt; &#8216;\u0418\u0432\u0430\u043d\u043e\u0432&#8217;, &#8216;region&#8217; =&gt; &#8216;MSK&#8217;],    [&#8216;id&#8217; =&gt; 02202403205678, &#8216;name&#8217; =&gt; &#8216;\u041f\u0435\u0442\u0440\u043e\u0432&#8217;, &#8216;region&#8217; =&gt; &#8216;SPB&#8217;],]);\/\/ \u0421\u0440\u0430\u0437\u0443 \u0437\u043d\u0430\u0435\u043c:$region = substr($doctor-&gt;id, 0, 2);   \/\/ 01 = \u041c\u043e\u0441\u043a\u0432\u0430$date = substr($doctor-&gt;id, 2, 8);      \/\/ 20240320\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u0435\u0440\u0435\u0434 UUID:\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0440\u0434\u0438\u043d\u0433: \u043f\u0440\u0435\u0444\u0438\u043a\u0441 = \u043d\u043e\u043c\u0435\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430: timestamp \u0432\u043d\u0443\u0442\u0440\u0438\u0422\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f: \u0437\u043d\u0430\u0435\u043c \u0442\u0438\u043f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f: \u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0422\u0440\u0435\u0439\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439:trait HasSmartIdentifiers{    public static function bootHasSmartIdentifiers()    {        static::creating(function ($model) {            if (empty($model-&gt;hash)) {                $model-&gt;hash = $model-&gt;generateHash();            }        });    }        public function generateHash(): string    {        $prefix = config(&#171;id-prefixes.{$this-&gt;getTable()}.prefix&#187;);        $salted = $prefix . $this-&gt;id . config(&#8216;app.key&#8217;);                return $prefix . substr(md5($salted), 0, 16);    }        public function getReadableIdAttribute(): string    {        $prefix = config(&#171;id-prefixes.{$this-&gt;getTable()}.prefix&#187;);        return &#171;{$prefix}-{$this-&gt;id}&#187;;    }        public function getRouteKeyName()    {        return &#8216;hash&#8217;;    }        public function scopeWhereIdentifier($query, $identifier)    {        if (preg_match(&#8216;\/^[A-Z]{3}-\\d+$\/&#8217;, $identifier)) {            $id = substr($identifier, 4);            return $query-&gt;where(&#8216;id&#8217;, $id);        }                if (preg_match(&#8216;\/^[A-Z]{3}[a-f0-9]{16}$\/&#8217;, $identifier)) {            return $query-&gt;where(&#8216;hash&#8217;, $identifier);        }                if (is_numeric($identifier)) {            return $query-&gt;where(&#8216;id&#8217;, $identifier);        }                return $query-&gt;where(&#8216;hash&#8217;, $identifier);    }}\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438:class Doctor extends Model{    use HasSmartIdentifiers;        protected $fillable = [&#8216;full_name&#8217;];    protected $appends =&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-481309","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/481309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=481309"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/481309\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=481309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=481309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=481309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}