SpecAttr.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Models\Goods;
  3. use App\Base\BaseModel;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. /**
  6. * App\Models\Goods\SpecAttr
  7. *
  8. * @property int $id
  9. * @property int $spec_id
  10. * @property string $name
  11. * @property \Illuminate\Support\Carbon|null $created_at
  12. * @property \Illuminate\Support\Carbon|null $updated_at
  13. * @property string|null $deleted_at
  14. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr newModelQuery()
  15. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr newQuery()
  16. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr query()
  17. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr whereCreatedAt($value)
  18. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr whereDeletedAt($value)
  19. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr whereId($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr whereName($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr whereSpecId($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|SpecAttr whereUpdatedAt($value)
  23. * @mixin \Eloquent
  24. * @method static \Illuminate\Database\Query\Builder|SpecAttr onlyTrashed()
  25. * @method static \Illuminate\Database\Query\Builder|SpecAttr withTrashed()
  26. * @method static \Illuminate\Database\Query\Builder|SpecAttr withoutTrashed()
  27. * @property-read \App\Models\Goods\Spec|null $spec
  28. */
  29. class SpecAttr extends BaseModel
  30. {
  31. use SoftDeletes;
  32. protected $table = "spec_attr";
  33. public function spec()
  34. {
  35. return $this->belongsTo(Spec::class, "spec_id", "id");
  36. }
  37. }