table_day_k_base.class.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * 数据库表:管理员组
  4. *
  5. * @createtime 2018/03/01
  6. * @author 空竹
  7. * @copyright 芝麻开发(http://www.zhimawork.com)
  8. */
  9. class Table_day_k_base extends Table {
  10. protected $table_name = 'day_k_base';//表名,不带前缀,前缀在config中定义
  11. protected $table_id = 'day_k_id';//指定ID字段名称,必须
  12. protected $table_status = '';//指定状态字段名称,如果有
  13. protected $table_order = '';//指定排序字段名称,如果有
  14. //数据库结构
  15. protected function struct(){
  16. $attr = array();
  17. $attr['id'] = 'day_k_id';
  18. $attr['date'] = 'day_k_date';
  19. $attr['code'] = 'day_k_code';
  20. $attr['type'] = 'day_k_open_price';
  21. $attr['multiple'] = 'day_k_close_price';
  22. $attr['subprice'] = 'day_k_hightest_price';
  23. $attr['oldprice'] = 'day_k_lowest_price';
  24. $attr['newprice'] = 'day_k_increase_price';
  25. $attr['oldprice'] = 'day_k_increase_value';
  26. $attr['newprice'] = 'day_k_turnover';
  27. $attr['oldprice'] = 'day_k_amount';
  28. $attr['newprice'] = 'day_k_value';
  29. $attr['oldprice'] = 'day_k_open_price_qfq';
  30. $attr['newprice'] = 'day_k_close_price_qfq';
  31. $attr['newprice'] = 'day_k_hightest_price_qfq';
  32. $attr['oldprice'] = 'day_k_lowest_price_qfq';
  33. $attr['newprice'] = 'day_k_m5';
  34. $attr['newprice'] = 'day_k_m10';
  35. $attr['oldprice'] = 'day_k_m20';
  36. $attr['newprice'] = 'day_k_m60';
  37. $attr['newprice'] = 'day_k_kdj';
  38. $attr['oldprice'] = 'day_k_macd';
  39. $attr['newprice'] = 'day_k_rsi';
  40. return $attr;
  41. }
  42. public function add($attr){
  43. $param = array (
  44. 'admingroup_name' => array('string', $attr['name'])
  45. );
  46. return $this->pdo->sqlinsert($this->table_fullname, $param);
  47. }
  48. //获取列表(分页)
  49. //$count、$page和$pagesize都为0时,返回全部结果(适用于无需分页的情况)
  50. //
  51. //@param $filter array -- 过滤条件,格式见Table::filterToWhere
  52. //@param $count -- 0:返回列表 1:返回结果数量
  53. //@param $page -- 当前第几页
  54. //@param $pagesize -- 每页数量
  55. public function getList($filter = array(), $count = 0, $page = 0, $pagesize = 0)
  56. {
  57. }
  58. }
  59. ?>