Code.php 492 B

12345678910111213141516171819202122
  1. <?php
  2. namespace app\common\model\plus\giftpackage;
  3. use app\common\model\BaseModel;
  4. /**
  5. * 礼包购码模型
  6. */
  7. class Code extends BaseModel
  8. {
  9. protected $name = 'gift_code';
  10. protected $pk = 'gift_code_id';
  11. public static function detail($gift_package_id){
  12. return (new static())->where('gift_package_id', '=', $gift_package_id)->find();
  13. }
  14. public static function getList($id){
  15. return (new static())->where('gift_package_id', '=', $id)->select();
  16. }
  17. }