TestProduct.php 594 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. *
  4. *User:Administrator
  5. *Date:2021/10/11
  6. */
  7. namespace app\api\model;
  8. use think\Model;
  9. class TestProduct extends Model
  10. {
  11. protected $table = 't_test_product';
  12. protected $pk = 'id';
  13. public function deleteProductInfoByTestModelID($test_model_id)
  14. {
  15. return $this->where('test_model_id', '=', $test_model_id)->delete();//return 2
  16. }
  17. public function insertProductInfo($update_data)
  18. {
  19. return $this->insertAll($update_data);
  20. }
  21. public function createProductInfo($update_data)
  22. {
  23. return $this->insertAll($update_data);
  24. }
  25. }