6
0
Fork 0

返回砍价活动开始时间和结束时间

release
vine_liutk 2022-04-08 16:27:07 +08:00
parent 942edeabe8
commit 4bbd9f9372
2 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,8 @@ class BargainActivityResource extends JsonResource
'skus' => ProductSkuSimpleResource::collection($this->whenLoaded('skus')), 'skus' => ProductSkuSimpleResource::collection($this->whenLoaded('skus')),
'share_image'=> $this->share_image ?? '', 'share_image'=> $this->share_image ?? '',
'share_title'=> $this->share_title ?? '', 'share_title'=> $this->share_title ?? '',
'start_at' => $this->start_at->rawFormat('Y-m-d H:i:s'),
'end_at' => $this->end_at->rawFormat('Y-m-d H:i:s'),
]; ];
} }
} }

View File

@ -14,6 +14,8 @@ class BargainActivity extends Model
protected $casts = [ protected $casts = [
'images' => JsonArray::class, 'images' => JsonArray::class,
'start_at' => 'datetime',
'end_at' => 'datetime',
]; ];
public static $enabledText = [ public static $enabledText = [