원클릭으로
add-entity
Add a new database entity with migrations for all three databases (MySQL, MSSQL, PostgreSQL)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add a new database entity with migrations for all three databases (MySQL, MSSQL, PostgreSQL)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Add a new API endpoint with controller, service, and DTOs following OMS patterns
Add a new mobile page to frontend.h5 using Vant 4 components
Add a new frontend page with proper layout, table, and API integration following OMS UI standards
Audit backend code to ensure all queries properly filter by OrgId for multi-tenant security
Debug and troubleshoot issues in the OMS system with systematic approach
Create database migration files for all three databases (MySQL, MSSQL, PostgreSQL) when schema changes are needed
| name | add-entity |
| description | Add a new database entity with migrations for all three databases (MySQL, MSSQL, PostgreSQL) |
| disable-model-invocation | false |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash |
Add a new database entity to the OMS system with proper multi-database support.
When the user requests to add a new entity (e.g., "add a Product entity"), follow these steps:
backend/omsapi/Models/Entities/{EntityName}Entity.csBaseEntity (includes Id, CreatedAt, UpdatedAt, OrgId)namespace omsapi.Models.Entities
{
/// <summary>
/// {Entity description}
/// </summary>
public class {EntityName}Entity : BaseEntity
{
/// <summary>
/// Property description
/// </summary>
public string PropertyName { get; set; } = string.Empty;
// Add navigation properties if needed
}
}
backend/omsapi/Data/OmsContext.csbackend/omsapi/Data/OmsPgContext.cspublic DbSet<{EntityName}Entity> {EntityName}s { get; set; }OnModelCreating if needed (indexes, relationships, etc.)CRITICAL: Must create migrations for ALL THREE databases:
database/mysql/V{next_version}_Add_{EntityName}_Table.sqldatabase/mssql/V{next_version}_Add_{EntityName}_Table.sqldatabase/postgresql/V{next_version}_Add_{EntityName}_Table.sqlMigration Template:
-- MySQL
CREATE TABLE `{table_name}` (
`Id` BIGINT AUTO_INCREMENT PRIMARY KEY,
`OrgId` BIGINT NOT NULL,
`CreatedAt` DATETIME(6) NOT NULL,
`UpdatedAt` DATETIME(6) NOT NULL,
-- Add custom fields here
INDEX `IX_{table_name}_OrgId` (`OrgId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- SQL Server
CREATE TABLE [{table_name}] (
[Id] BIGINT IDENTITY(1,1) PRIMARY KEY,
[OrgId] BIGINT NOT NULL,
[CreatedAt] DATETIME2 NOT NULL,
[UpdatedAt] DATETIME2 NOT NULL,
-- Add custom fields here
INDEX [IX_{table_name}_OrgId] ([OrgId])
);
-- PostgreSQL
CREATE TABLE "{table_name}" (
"Id" BIGSERIAL PRIMARY KEY,
"OrgId" BIGINT NOT NULL,
"CreatedAt" TIMESTAMP NOT NULL,
"UpdatedAt" TIMESTAMP NOT NULL,
-- Add custom fields here
);
CREATE INDEX "IX_{table_name}_OrgId" ON "{table_name}" ("OrgId");
{EntityName}Entity for class, {table_name} for database table