feat: add database schema, migrations, and API endpoints for span annotations
- Add span_label_types and span_annotations tables to schema - Seed default span label types (bull_flag, bear_flag, etc.) - Implement CRUD API endpoints for span label types - Implement CRUD API endpoints for span annotations - Add time swap validation in POST endpoint (start_time <= end_time)
This commit is contained in:
parent
8a7eb1fb08
commit
dadf515406
11 changed files with 1131 additions and 0 deletions
11
scripts/seed-span-labels.ts
Normal file
11
scripts/seed-span-labels.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { seedSpanLabelTypes } from '../src/lib/db/seed-span-label-types';
|
||||
|
||||
seedSpanLabelTypes()
|
||||
.then(() => {
|
||||
console.log('Seed complete');
|
||||
process.exit(0);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Seed failed:', error);
|
||||
process.exit(1);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue