返回 Skill 列表
extension
分类: 开发与工程无需 API Key

Backend Models

定义数据库模型和模式,包括适当的数据类型、约束、关系和验证规则。在创建或修改数据库模型、ORM实体、模式定义或数据验证层时使用此技能。当处理Prisma模式文件、TypeORM实体、Drizzle模式定义、Mongoose模型、数据库模型类、定义表结构和关系的文件、数据库实体的验证模式或实现数据完整性约束和级联行为的文件时。

person作者: jakexiaohubgithub

Backend Models

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend models.

When to use this skill

  • When creating or modifying Prisma schema files (schema.prisma)
  • When defining TypeORM entities or Drizzle schema definitions
  • When writing Mongoose schemas or Sequelize models
  • When implementing database table structures with columns and data types
  • When defining relationships between models (one-to-one, one-to-many, many-to-many)
  • When adding database constraints (NOT NULL, UNIQUE, CHECK, foreign keys)
  • When creating indexes on model fields for query performance
  • When implementing model-level validation rules or business logic
  • When defining cascade behaviors for related data (CASCADE, SET NULL, RESTRICT)
  • When setting up timestamps (createdAt, updatedAt) or soft delete functionality

Instructions

For details, refer to the information provided in this file: backend models