itemfiles.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. Doo::loadCore('db/DooModel');
  3. /**
  4. * 用户表
  5. */
  6. class ItemFiles extends DooModel {
  7. public $ifid;
  8. public $hashcode;
  9. public $pid;
  10. public $stid;
  11. public $mpid;
  12. public $pmid;
  13. public $numpname;
  14. public $times;
  15. public $auditoruid;
  16. public $filepath;
  17. public $isnew;
  18. public $intime;
  19. public $_table = 'jl_itemfiles';
  20. public $_primarykey = 'ifid';
  21. public $_fields = array('ifid', 'hashcode', 'pid', 'stid', 'mpid', 'pmid', 'numpname', 'times', 'auditoruid', 'filepath', 'isnew', 'intime');
  22. public function __construct() {
  23. parent::setupModel(__CLASS__);
  24. }
  25. public function createFile($pid, $stid, $mpid, $pmid, $numpname, $auditoruid, $filepath, $ziphashcode = 0, $filehashcode, $isnew, $times = 0) {
  26. $this->pid = $pid;
  27. $this->stid = $stid;
  28. $this->mpid = $mpid;
  29. $this->pmid = $pmid;
  30. $this->numpname = $numpname;
  31. if ($times > 0)
  32. $this->times = $times;
  33. $this->auditoruid = $auditoruid;
  34. $this->filepath = $filepath;
  35. if ($ziphashcode > 0)
  36. $this->ziphashcode = $ziphashcode;
  37. $this->filehashcode = $filehashcode;
  38. $this->isnew = $isnew;
  39. $this->intime = time();
  40. return $this->insert();
  41. }
  42. }
  43. ?>