链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
664 B

  1. <?php
  2. namespace App\Models;
  3. use Dcat\Admin\Traits\HasDateTimeFormatter;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. use Illuminate\Database\Eloquent\Model;
  6. class ImsCjdcMarket extends Model
  7. {
  8. use HasDateTimeFormatter;
  9. use SoftDeletes;
  10. protected $table = 'ims_cjdc_market';
  11. protected $dateFormat = 'U';
  12. public function setImgsAttribute($imgs)
  13. {
  14. if ($imgs){
  15. $this->attributes['imgs'] = implode(',',$imgs);
  16. }
  17. }
  18. public function getImgsAttribute($imgs)
  19. {
  20. return explode(',',$imgs);
  21. }
  22. public function mp(){
  23. return $this->hasOne('\App\Models\LanzuMpInfo','id','mp_id');
  24. }
  25. }