← Back to list

symfony-skapi-entity
by Swoking
Claude Code plugin pour projets Symfony StarterKit
⭐ 0🍴 0📅 Jan 19, 2026
SKILL.md
name: symfony-sk:api-entity description: Create or modify Doctrine entities. Use for database models. allowed-tools: Read, Write, Edit, Glob, Grep
API Entity Skill
Mission
Create or modify Doctrine ORM entities.
Location
api/src/Entity/<Name>.php
Template
<?php
namespace App\Entity;
use App\Repository\<Name>Repository;
use Doctrine\ORM\Mapping as ORM;
use StarterKit\Entity\BaseEntity;
use Symfony\Component\Serializer\Attribute\Groups;
#[ORM\Entity(repositoryClass: <Name>Repository::class)]
#[ORM\Table(name: '<table_name>')]
class <Name> extends BaseEntity
{
#[ORM\Column(type: 'string', length: 255)]
#[Groups(['<feature>'])]
private ?string $title = null;
#[ORM\Column(type: 'datetime', nullable: true)]
#[Groups(['<feature>'])]
private ?\DateTime $date = null;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private ?User $owner = null;
// Getters and setters...
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
}
Common Column Types
| Type | Usage |
|---|---|
string | Text (specify length) |
text | Long text |
integer | Numbers |
boolean | True/false |
datetime | Date and time |
date | Date only |
json | JSON data |
Relationships
// Many-to-One
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private ?User $owner = null;
// One-to-Many
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: Child::class)]
private Collection $children;
// Many-to-Many
#[ORM\ManyToMany(targetEntity: Tag::class)]
private Collection $tags;
Serialization Groups
Use #[Groups(['<feature>'])] for API output control.
After Modification
IMPORTANT: Run dsu (Doctrine Schema Update) on VM after entity changes.
Use vm-executor agent:
"Run: ./scripts/dsu"
Checklist
- Extends
BaseEntity - Has repository class
- Groups defined for serialization
- Getters/setters for all properties
- Run
dsuafter changes
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon