@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - Schema::create('company_applies', function (Blueprint $table) { |
|
| 13 | + Schema::create('company_applies', function(Blueprint $table) { |
|
| 14 | 14 | $table->uuid('id')->comment('主键'); |
| 15 | 15 | $table->enum('type', ['company', 'person'])->default('company')->comment('资料类型'); |
| 16 | 16 | $table->string("id_number")->comment("企业注册号/身份证号码"); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | - Schema::create('companies', function (Blueprint $table) { |
|
| 14 | + Schema::create('companies', function(Blueprint $table) { |
|
| 15 | 15 | $table->uuid('id')->comment('主键'); |
| 16 | 16 | $table->foreignUuid('company_apply_id')->nullable()->comment('注册申请表ID'); |
| 17 | 17 | $table->string('name')->comment('名称'); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - Schema::create('company_profiles', function (Blueprint $table) { |
|
| 13 | + Schema::create('company_profiles', function(Blueprint $table) { |
|
| 14 | 14 | $table->id(); |
| 15 | 15 | $table->foreignUuid('company_id')->constrained('companies')->comment("企业ID"); |
| 16 | 16 | $table->string("id_number")->comment("企业注册号/身份证号码"); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - Schema::create('company_safes', function (Blueprint $table) { |
|
| 13 | + Schema::create('company_safes', function(Blueprint $table) { |
|
| 14 | 14 | $table->id('id')->comment("主键"); |
| 15 | 15 | $table->foreignUuid('company_account_id')->constrained('company_accounts')->nullable()->comment("账号ID"); |
| 16 | 16 | $table->enum('type', ['mobile', 'email'])->default('mobile')->comment("密保类型"); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - Schema::create('company_accounts', function (Blueprint $table) { |
|
| 13 | + Schema::create('company_accounts', function(Blueprint $table) { |
|
| 14 | 14 | $table->uuid('id')->primary()->comment("主键"); |
| 15 | 15 | $table->foreignUuid('company_id')->constrained('companies')->nullable()->comment("公司ID"); |
| 16 | 16 | $table->string("account")->unique()->comment("登录账号"); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - Schema::create('company_logs', function (Blueprint $table) { |
|
| 13 | + Schema::create('company_logs', function(Blueprint $table) { |
|
| 14 | 14 | $table->id()->comment("主键"); |
| 15 | 15 | $table->foreignUuid("company_id")->constrained('companies')->nullable()->comment("公司ID"); |
| 16 | 16 | $table->foreignUuid("company_account_id")->nullable()->comment("账号ID"); |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | { |
| 90 | 90 | if (!$medias = $this->getMedia(self::MEDIA_FILE)) |
| 91 | 91 | return []; |
| 92 | - return $medias->map(function ($item) { |
|
| 92 | + return $medias->map(function($item) { |
|
| 93 | 93 | return [ |
| 94 | 94 | 'name' => $item->file_name, |
| 95 | 95 | 'url' => $item->original_url, |
@@ -87,8 +87,9 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | public function getFilesAttribute() |
| 89 | 89 | { |
| 90 | - if (!$medias = $this->getMedia(self::MEDIA_FILE)) |
|
| 91 | - return []; |
|
| 90 | + if (!$medias = $this->getMedia(self::MEDIA_FILE)) { |
|
| 91 | + return []; |
|
| 92 | + } |
|
| 92 | 93 | return $medias->map(function ($item) { |
| 93 | 94 | return [ |
| 94 | 95 | 'name' => $item->file_name, |
@@ -100,8 +101,9 @@ discard block |
||
| 100 | 101 | |
| 101 | 102 | public function getBackAttribute() |
| 102 | 103 | { |
| 103 | - if (!$media = $this->getFirstMedia(self::MEDIA_BACK)) |
|
| 104 | - return []; |
|
| 104 | + if (!$media = $this->getFirstMedia(self::MEDIA_BACK)) { |
|
| 105 | + return []; |
|
| 106 | + } |
|
| 105 | 107 | return [ |
| 106 | 108 | 'name' => $media->file_name, |
| 107 | 109 | 'url' => $media->original_url, |
@@ -111,8 +113,9 @@ discard block |
||
| 111 | 113 | |
| 112 | 114 | public function getFrontAttribute() |
| 113 | 115 | { |
| 114 | - if (!$media = $this->getFirstMedia(self::MEDIA_FRONT)) |
|
| 115 | - return []; |
|
| 116 | + if (!$media = $this->getFirstMedia(self::MEDIA_FRONT)) { |
|
| 117 | + return []; |
|
| 118 | + } |
|
| 116 | 119 | return [ |
| 117 | 120 | 'name' => $media->file_name, |
| 118 | 121 | 'url' => $media->original_url, |
@@ -114,8 +114,9 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | public function getFilesAttribute() |
| 116 | 116 | { |
| 117 | - if (!$medias = $this->getMedia(self::MEDIA_FILE)) |
|
| 118 | - return []; |
|
| 117 | + if (!$medias = $this->getMedia(self::MEDIA_FILE)) { |
|
| 118 | + return []; |
|
| 119 | + } |
|
| 119 | 120 | return $medias->map(function ($item) { |
| 120 | 121 | return [ |
| 121 | 122 | 'name' => $item->file_name, |
@@ -127,8 +128,9 @@ discard block |
||
| 127 | 128 | |
| 128 | 129 | public function getLogoAttribute() |
| 129 | 130 | { |
| 130 | - if (!$media = $this->getFirstMedia(self::MEDIA_LOGO)) |
|
| 131 | - return []; |
|
| 131 | + if (!$media = $this->getFirstMedia(self::MEDIA_LOGO)) { |
|
| 132 | + return []; |
|
| 133 | + } |
|
| 132 | 134 | return [ |
| 133 | 135 | 'name' => $media->file_name, |
| 134 | 136 | 'url' => $media->original_url, |
@@ -138,8 +140,9 @@ discard block |
||
| 138 | 140 | |
| 139 | 141 | public function getBackAttribute() |
| 140 | 142 | { |
| 141 | - if (!$media = $this->getFirstMedia(self::MEDIA_BACK)) |
|
| 142 | - return []; |
|
| 143 | + if (!$media = $this->getFirstMedia(self::MEDIA_BACK)) { |
|
| 144 | + return []; |
|
| 145 | + } |
|
| 143 | 146 | return [ |
| 144 | 147 | 'name' => $media->file_name, |
| 145 | 148 | 'url' => $media->original_url, |
@@ -149,8 +152,9 @@ discard block |
||
| 149 | 152 | |
| 150 | 153 | public function getFrontAttribute() |
| 151 | 154 | { |
| 152 | - if (!$media = $this->getFirstMedia(self::MEDIA_FRONT)) |
|
| 153 | - return []; |
|
| 155 | + if (!$media = $this->getFirstMedia(self::MEDIA_FRONT)) { |
|
| 156 | + return []; |
|
| 157 | + } |
|
| 154 | 158 | return [ |
| 155 | 159 | 'name' => $media->file_name, |
| 156 | 160 | 'url' => $media->original_url, |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | { |
| 90 | 90 | if (!$medias = $this->getMedia(self::MEDIA_FILE)) |
| 91 | 91 | return []; |
| 92 | - return $medias->map(function ($item) { |
|
| 92 | + return $medias->map(function($item) { |
|
| 93 | 93 | return [ |
| 94 | 94 | 'name' => $item->file_name, |
| 95 | 95 | 'url' => $item->original_url, |
@@ -92,8 +92,9 @@ |
||
| 92 | 92 | |
| 93 | 93 | public function getAvatarAttribute() |
| 94 | 94 | { |
| 95 | - if (!$media = $this->getFirstMedia(self::MEDIA_AVATAR)) |
|
| 96 | - return []; |
|
| 95 | + if (!$media = $this->getFirstMedia(self::MEDIA_AVATAR)) { |
|
| 96 | + return []; |
|
| 97 | + } |
|
| 97 | 98 | return [ |
| 98 | 99 | 'name' => $media->file_name, |
| 99 | 100 | 'url' => $media->original_url, |