| name | schema-mapping |
| description | DB 컬럼 ↔ TypeScript 타입 1:1 매핑 강제. enum 값 고정, nullable 규칙. |
| metadata | {"filePattern":["**/types/**","**/schema*","**/migration*"],"bashPattern":["supabase migration"]} |
스키마 ↔ 타입 매핑
고정 enum 값
type Subject = string;
type IntentType = 'concept' | 'hint' | 'review' | 'similar';
type ResponseType = 'hint' | 'explanation' | 'feedback' | 'similar' | 'quiz' | 'summary';
type UserRole = 'teacher' | 'student';
type Mode = 'grill-me' | 'guide-me' | 'quick-me';
nullable 규칙
| 컬럼 | nullable | 이유 |
|---|
image_url | ✅ | 이미지 없는 질문 |
chunk_text | ✅ | v2 확장용 |
chunk_index | ✅ | v2 확장용 |
embedding | ✅ | v2 벡터검색 확장용 |
| 나머지 | ❌ | 필수 필드 |
타입 속성명 = DB 컬럼명
interface Lesson {
id: string;
teacher_id: string;
created_at: string;
}
interface Lesson {
teacherId: string;
createdAt: string;
}