init: 项目初始代码

This commit is contained in:
2026-10-14 14:00:29 +08:00
commit cc434cf89f
464 changed files with 66984 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace app\api\model;
use think\Model;
/**
* 优惠券模型
* @mixin \think\Model
*/
class GoodsCoupon extends BaseModel
{
protected $schema = [
'id' =>'int',
'platform_id' =>'int',
'language_id' =>'int',
'site_id' =>'int',
'old_code' =>'string',
'new_code' =>'string',
'create_time' =>'int',
'update_time' =>'int',
];
/**
*
* @param $data
* @return array|Model|void|null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getLatest($data)
{
return $this->order($this->pk,'desc')->where($data)->find();
}
}