ServiceItem.php 847 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Created by JetBrains PhpStorm.
  4. * User: charlie
  5. * Date: 13-11-29
  6. * Time: 下午4:47
  7. * 服务项目
  8. */
  9. class ServiceItem extends MongoAr
  10. {
  11. public $_id;
  12. public $status = 0; //状态
  13. public $master;//对应的Master
  14. public $title;//标题
  15. public $avatar = ''; //头像七牛的地址
  16. public $desc='';//简介
  17. public $pics=array();//相册
  18. public $prize;
  19. public static $status_option = array(
  20. 1 => array('name' => '正常', 'color' => 'green'),
  21. 0 => array('name' => '暂停服务', 'color' => 'blue'),
  22. -1 => array('name' => '删除', 'color' => 'red')
  23. );
  24. public static function model($className=__CLASS__)
  25. {
  26. return parent::model($className);
  27. }
  28. public function getCollectionName()
  29. {
  30. return 'service_item';
  31. }
  32. }