Define database models, schemas, and ORM mappings with proper relationships, constraints, and data integrity rules. Use this skill when creating or modifying ORM model classes, database schema definitions, model relationships, validators, or working with files like models.py, schema.prisma, entity classes, or Sequelize/TypeORM/ActiveRecord model definitions. Apply this skill when defining primary keys, foreign keys, indexes, unique constraints, timestamps, or when implementing model validation logic, serializers, and data type mappings. This skill ensures models follow naming conventions, include appropriate database constraints, define clear relationships with cascade behaviors, balance normalization with performance needs, and maintain data integrity at both the model and database levels.
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.
models.py, schema.prisma, entities/, or model definition filesFor details, refer to the information provided in this file: backend models