MachineTableSeeder.php
2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
use Carbon\Carbon;
use Illuminate\Database\Seeder;
class MachineTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$insert = [
[
'id' => 1,
'mac_no' => '1802270339800001',
'he_cloud_device_id' => '80048969',
'one_day_price' => 1,
'deposit' => 19900,
'free_time' => 0,
'spot_id' => 23,
'business_id' => 5,
'wx_mini_program' => 'test',
'ali_mini_program' => 'test',
'type' => 1,
'address'=>'111',
'hatch_number' => 9,
'position' => DB::raw( 'GeomFromText(\'POINT(31.2753965207 120.7460761070)\' )' ),
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'id' => 2,
'mac_no' => '1802270339800002',
'he_cloud_device_id' => '',
'one_day_price' => 1,
'deposit' => 19900,
'free_time' => 0,
'spot_id' => 23,
'business_id' => 5,
'wx_mini_program' => 'test',
'ali_mini_program' => 'test',
'type' => 1,
'address'=>'111',
'hatch_number' => 9,
'position' => DB::raw( 'GeomFromText(\'POINT(31.2758550066 120.7593154907)\' )' ),
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'id' => 3,
'mac_no' => '1802270339800003',
'he_cloud_device_id' => '',
'one_day_price' => 1,
'deposit' => 19900,
'free_time' => 0,
'spot_id' => 23,
'business_id' => 5,
'wx_mini_program' => 'test',
'ali_mini_program' => 'test',
'type' => 1,
'address'=>'111',
'hatch_number' => 9,
'position' => DB::raw( 'GeomFromText(\'POINT(31.2429300520 120.7545518875)\' )' ),
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
];
DB::table('machine')->insert($insert);
}
}