OwnerPriceOperation.php 657 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class OwnerPriceOperation extends Model
  5. {
  6. protected $fillable = [
  7. "operation_type", //操作类型
  8. "name", //名称
  9. "strategy", //策略
  10. "feature", //特征
  11. "remark", //备注
  12. ];
  13. public function ownerInStorageRule()
  14. { //入库规则
  15. return $this->hasOne(OwnerInStorageRule::class,"owner_price_operation_id","id");
  16. }
  17. public function ownerOutStorageRules()
  18. { //出库规则
  19. return $this->hasMany(OwnerOutStorageRule::class,"owner_price_operation_id","id");
  20. }
  21. }