Skip to content

Commit 6e49005

Browse files
committed
Modified app/Models/City.php
Modified app/Models/Country.php Modified app/Router.php Modified docker/docker-compose.yml Modified docker/swoole.yml
1 parent cf82029 commit 6e49005

File tree

5 files changed

+13
-43
lines changed

5 files changed

+13
-43
lines changed

app/Models/City.php

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,16 @@
11
<?php
2-
namespace App\Models;
32

4-
use ManaPHP\Db\Model;
3+
namespace App\Models;
54

65
/**
7-
* Class App\Models\City
6+
* Class City
7+
*
88
* @property \App\Models\Country $country
99
*/
10-
class City extends Model
10+
class City extends \ManaPHP\Db\Model
1111
{
1212
public $city_id;
1313
public $city;
1414
public $country_id;
1515
public $last_update;
16-
17-
/**
18-
* @return string
19-
*/
20-
public function getTable()
21-
{
22-
return 'city';
23-
}
24-
25-
/**
26-
* @return string
27-
*/
28-
public function getPrimaryKey()
29-
{
30-
return 'city_id';
31-
}
3216
}

app/Models/Country.php

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
11
<?php
2-
namespace App\Models;
32

4-
use ManaPHP\Db\Model;
3+
namespace App\Models;
54

65
/**
7-
* Class App\Models\Country
6+
* Class Country
7+
*
88
* @property-read \App\Models\City $cities
99
*/
10-
class Country extends Model
10+
class Country extends \ManaPHP\Db\Model
1111
{
1212
public $country_id;
1313
public $country;
1414
public $last_update;
15-
16-
/**
17-
* @return string
18-
*/
19-
public function getTable()
20-
{
21-
return 'country';
22-
}
23-
24-
/**
25-
* @return string
26-
*/
27-
public function getPrimaryKey()
28-
{
29-
return 'country_id';
30-
}
3115
}

app/Router.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace App;
34

45
use App\Controllers\IndexController;

docker/docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "2"
22
services:
33
api_fpm:
4-
image: manaphp/php73:2.0
4+
image: manaphp/php74:3.1
55
volumes:
66
- ../:/var/www/html
77
- ./fpm/conf.d:/etc/php/conf.d
@@ -10,8 +10,9 @@ services:
1010
- /data/volumes/${COMPOSE_PROJECT_NAME}/api/app/tmp:/var/www/html/tmp
1111
restart: always
1212
api_nginx:
13-
image: nginx:1.17.1
13+
image: nginx:1.17.2
1414
volumes:
15+
- /usr/share/zoneinfo/PRC:/etc/localtime
1516
- ../:/var/www/html
1617
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
1718
- /data/volumes/${COMPOSE_PROJECT_NAME}/api/nginx:/var/log/nginx

docker/swoole.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "2"
22
services:
33
api:
4-
image: manaphp/php73:2.0
4+
image: manaphp/php74:3.1
55
volumes:
66
- /usr/share/zoneinfo/PRC:/etc/localtime
77
- ../:/var/www/html

0 commit comments

Comments
 (0)