|
|
@@ -21,71 +21,76 @@ class InitSystemChannel extends Command
|
|
|
*/
|
|
|
protected $description = 'create system channel. like pali text , wbw template ect.';
|
|
|
|
|
|
- protected $channels =[
|
|
|
+ protected $channels = [
|
|
|
[
|
|
|
- "name"=>'_System_Pali_VRI_',
|
|
|
- 'type'=>'original',
|
|
|
- 'lang'=>'pali',
|
|
|
+ "name" => '_System_Pali_VRI_',
|
|
|
+ 'type' => 'original',
|
|
|
+ 'lang' => 'pali',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_System_Wbw_VRI_',
|
|
|
- 'type'=>'original',
|
|
|
- 'lang'=>'pali',
|
|
|
+ "name" => '_System_Wbw_VRI_',
|
|
|
+ 'type' => 'original',
|
|
|
+ 'lang' => 'pali',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_System_Grammar_Term_zh-hans_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'zh-Hans',
|
|
|
+ "name" => '_System_Grammar_Term_zh-hans_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'zh-Hans',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_System_Grammar_Term_zh-hant_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'zh-Hant',
|
|
|
+ "name" => '_System_Grammar_Term_zh-hant_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'zh-Hant',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_System_Grammar_Term_en_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'en',
|
|
|
+ "name" => '_System_Grammar_Term_en_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'en',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_System_Grammar_Term_my_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'my',
|
|
|
+ "name" => '_System_Grammar_Term_my_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'my',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_community_term_zh-hans_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'zh-Hans',
|
|
|
+ "name" => '_community_term_zh-hans_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'zh-Hans',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_community_term_zh-hant_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'zh-Hant',
|
|
|
+ "name" => '_community_term_zh-hant_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'zh-Hant',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_community_term_en_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'en',
|
|
|
+ "name" => '_community_term_en_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'en',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_community_translation_zh-hans_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'zh-Hans',
|
|
|
+ "name" => '_community_translation_zh-hans_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'zh-Hans',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_community_translation_zh-hant_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'zh-Hant',
|
|
|
+ "name" => '_community_translation_zh-hant_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'zh-Hant',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_community_translation_en_',
|
|
|
- 'type'=>'translation',
|
|
|
- 'lang'=>'en',
|
|
|
+ "name" => '_community_translation_en_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'en',
|
|
|
],
|
|
|
[
|
|
|
- "name"=>'_System_Quote_',
|
|
|
- 'type'=>'original',
|
|
|
- 'lang'=>'en',
|
|
|
+ "name" => '_System_Quote_',
|
|
|
+ 'type' => 'original',
|
|
|
+ 'lang' => 'en',
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "name" => '_community_summary_zh-hans_',
|
|
|
+ 'type' => 'translation',
|
|
|
+ 'lang' => 'zh-Hans',
|
|
|
],
|
|
|
];
|
|
|
|
|
|
@@ -106,7 +111,7 @@ class InitSystemChannel extends Command
|
|
|
*/
|
|
|
public function handle()
|
|
|
{
|
|
|
- if(\App\Tools\Tools::isStop()){
|
|
|
+ if (\App\Tools\Tools::isStop()) {
|
|
|
return 0;
|
|
|
}
|
|
|
$this->info("start");
|
|
|
@@ -116,18 +121,18 @@ class InitSystemChannel extends Command
|
|
|
'name' => $value['name'],
|
|
|
'owner_uid' => config("mint.admin.root_uuid"),
|
|
|
]);
|
|
|
- if(empty($channel->id)){
|
|
|
+ if (empty($channel->id)) {
|
|
|
$channel->id = app('snowflake')->id();
|
|
|
}
|
|
|
$channel->type = $value['type'];
|
|
|
$channel->lang = $value['lang'];
|
|
|
$channel->editor_id = 0;
|
|
|
$channel->owner_uid = config("mint.admin.root_uuid");
|
|
|
- $channel->create_time = time()*1000;
|
|
|
- $channel->modify_time = time()*1000;
|
|
|
+ $channel->create_time = time() * 1000;
|
|
|
+ $channel->modify_time = time() * 1000;
|
|
|
$channel->is_system = true;
|
|
|
$channel->save();
|
|
|
- $this->info("created". $value['name']);
|
|
|
+ $this->info("created" . $value['name']);
|
|
|
}
|
|
|
return 0;
|
|
|
}
|