task_id: task_create_model_label_invitation entity_id: model_label_invitation generated_at: '2025-12-18T17:43:33.705731' workflow_version: v003 target: type: model definition: id: model_label_invitation name: LabelInvitation description: Invitations from labels to artists to join their roster table_name: label_invitations fields: - name: id type: uuid constraints: - primary_key description: Unique identifier - name: labelId type: uuid constraints: - foreign_key - not_null - indexed description: Reference to the inviting label (FK to labels table) - name: artistId type: uuid constraints: - foreign_key - not_null - indexed description: Reference to the invited artist (FK to artists table) - name: status type: enum enum_values: - pending - accepted - declined - expired constraints: - not_null - default default: pending description: Current status of the invitation - name: message type: text constraints: [] description: Optional message from label to artist - name: expiresAt type: datetime constraints: - not_null description: When the invitation expires - name: createdAt type: datetime constraints: - not_null description: When invitation was created - name: updatedAt type: datetime constraints: - not_null description: When invitation was last updated relations: [] indexes: - fields: - labelId - artistId unique: true name: label_artist_unique - fields: - artistId - status unique: false name: artist_pending_invitations timestamps: true soft_delete: false validations: - field: expiresAt rule: future_date message: Expiration date must be in the future related: models: [] apis: [] components: [] dependencies: entity_ids: [] definitions: [] files: to_create: - prisma/schema.prisma - app/models/labelinvitation.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