123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\admin\model;
- class ExpressData extends Base
- {
- protected $schema = [
- 'id' =>'bigint',
- 'order_out_id' =>'int',
- 'out_child_id' =>'int',
- 'post_code' =>'varchar',
- 'post_name' =>'varchar',
- 'post_express' =>'varchar',
- 'post_logo' =>'varchar',
- 'post_data' =>'text',
- 'contactor' =>'varchar',
- 'mobile' =>'varchar',
- 'status' =>'tinyint',
- 'remark' =>'varchar',
- 'crontab_num' =>'int',
- 'addtime' =>'datetime',
- 'updatetime' =>'datetime',
- ];
- protected static $status=[
- 0=>'未获取到数据',
- 1=>'待揽收',
- 2=>'已揽收',
- 3=>'运输中',
- 4=>'派件中',
- 5=>'已代签收',
- 6=>'已签收',
- 7=>'包裹异常',
- ];
- protected array $json=['post_data'];
- public static function getStatusAttr($value){
- return self::$status[$value]??$value;
- }
- public function OrderOut(){
- return $this->belongsTo('OrderOut','order_out_id','id');
- }
- public function OrderChild(){
- return $this->belongsTo('OrderOutChild','out_child_id','id');
- }
- }
|