project-standalo-sonic-cloud/.workflow/versions/v001/contexts/model_genre.yml

68 lines
1.4 KiB
YAML

task_id: task_create_model_genre
entity_id: model_genre
generated_at: '2025-12-18T15:16:50.220626'
workflow_version: v001
target:
type: model
definition:
id: model_genre
name: Genre
table_name: genres
description: Music category for discovery
fields:
- name: id
type: uuid
constraints:
- primary_key
- name: name
type: string
constraints:
- unique
- not_null
- name: slug
type: string
constraints:
- unique
- not_null
- name: description
type: text
constraints:
- nullable
- name: created_at
type: timestamp
constraints:
- not_null
- name: updated_at
type: timestamp
constraints:
- not_null
relations:
- type: has_many
to: model_song
through: song_genres
foreign_key: genre_id
indexes:
- fields:
- slug
unique: true
timestamps: true
related:
models: []
apis: []
components: []
dependencies:
entity_ids: []
definitions: []
files:
to_create:
- prisma/schema.prisma
- app/models/genre.ts
reference: []
acceptance:
- criterion: Model defined in Prisma schema
verification: Check prisma/schema.prisma
- criterion: TypeScript types exported
verification: Import type in test file
- criterion: Relations properly configured
verification: Check Prisma relations