feat: MCP tools for events (list/get/create/update/delete/done/ack); EventRules shared by /api and manual
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BCrwHHnGCB5XH968Nxokqw
This commit is contained in:
@@ -27,6 +27,16 @@ class User extends Model
|
||||
return $this->events()->with('source')->whereKey($id)->firstOrFail();
|
||||
}
|
||||
|
||||
/**
|
||||
* Живые события в этих состояниях, по сроку.
|
||||
*
|
||||
* @param list<string> $states
|
||||
*/
|
||||
public function liveEvents(array $states): HasMany
|
||||
{
|
||||
return $this->events()->with('source')->whereIn('state', $states)->orderBy('due_date')->orderBy('due_instant');
|
||||
}
|
||||
|
||||
/** Закрытые события для архива: done и expired, свежие первыми, не больше 100. */
|
||||
public function archive(): HasMany
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user