Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides SQLModel database models, CRUD operations, joined queries, relationship setup, async session management, and Pydantic validation.
Use this skill ↓32% 92%+60 ptsof test cases passed
Passed 23 of 25 test cases with the skill, and 8 of 25 without it.
3 of 3 safety checks passed
Not used yet
Expert guidance for SQLModel database models and CRUD operations, including Pydantic integration, async session management, query building with joins, and relationship configuration for ERP entities like Student, Fee, and Attendance.
This skill triggers when users request:
# models/student.py
from sqlmodel import SQLModel, Field, Relationship
from datetime import datetime
from typing import Optional, List
from enum import Enum
class StudentRole(str, Enum):
STUDENT = "student"
TEACHER = "teacher"
ADMIN = "admin"
class Student(SQLModel, table=True):
"""Student model with relationships to fees and attendance"""
id: Optional[str] = Field(default=None, primary_key=True)
name: str = Field(min_length=2, max_length=100, index=True)
email: str = Field(unique=True, index=True)
phone: Optional[str] = Field(default=None, pattern=r'^\+?[\d\s-]+$')
password_hash: str
role: StudentRole = Field(default=StudentRole.STUDENT)
class_id: Optional[str] = Field(default=None, foreign_key="class.id", index=True)
Next to this one in the catalogue, plus more from the same author.