|
@@ -93,12 +93,16 @@ class InitKeywordComment extends Command |
|
@@ -93,12 +93,16 @@ class InitKeywordComment extends Command |
|
93
|
if(!isset($item['name']) || !isset($item['comment'])){
|
93
|
if(!isset($item['name']) || !isset($item['comment'])){
|
|
94
|
continue;
|
94
|
continue;
|
|
95
|
}
|
95
|
}
|
|
|
|
96
|
+ $twoMonthsAgo = strtotime('-2 months');
|
|
|
|
97
|
+ $randomTimestamp = rand($twoMonthsAgo, time());
|
|
|
|
98
|
+ $randomDateTime = date('Y-m-d H:i:s', $randomTimestamp);
|
|
96
|
$data[] = [
|
99
|
$data[] = [
|
|
97
|
'nickname'=>$item['name'],
|
100
|
'nickname'=>$item['name'],
|
|
98
|
'text'=>$item['comment'],
|
101
|
'text'=>$item['comment'],
|
|
99
|
'project_id'=>$project_id,
|
102
|
'project_id'=>$project_id,
|
|
100
|
'type'=>1,
|
103
|
'type'=>1,
|
|
101
|
'uid'=>0,
|
104
|
'uid'=>0,
|
|
|
|
105
|
+ 'start_time'=>$randomDateTime,
|
|
102
|
'created_at'=>date('Y-m-d H:i:s'),
|
106
|
'created_at'=>date('Y-m-d H:i:s'),
|
|
103
|
'updated_at'=>date('Y-m-d H:i:s')
|
107
|
'updated_at'=>date('Y-m-d H:i:s')
|
|
104
|
];
|
108
|
];
|