|
@@ -0,0 +1,44 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace App\Models;
|
|
|
+
|
|
|
+
|
|
|
+use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
+
|
|
|
+class ConfigCityManagement extends BaseModel
|
|
|
+{
|
|
|
+ use SoftDeletes;
|
|
|
+
|
|
|
+ protected $dates = ['deleted_at'];
|
|
|
+ protected $table = 'config_city_management';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 可被批量赋值的字段
|
|
|
+ * @var array
|
|
|
+ */
|
|
|
+ protected $fillable = ['province_id','city_id','province_name','city_name','express_type'];
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 快递方式:0.快递;1. 自提
|
|
|
+ *
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getExpressTypeAttribute()
|
|
|
+ {
|
|
|
+ $express_type = '';
|
|
|
+ switch ($this->express_type) {
|
|
|
+ case 0:
|
|
|
+ $express_type = '快递';
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ $express_type = '自提';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ }
|
|
|
+
|
|
|
+ return $express_type;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|