要件定義からデータ構造抽出
Kiroがrequirements.mdから必要なエンティティと属性を識別し抽出
リレーションシップの自動定義
エンティティ間の関係性(1対多、多対多など)を自動分析・提案
ER図の生成
関連性を可視化したER図とドキュメントを自動生成
モデル・マイグレーション生成
PostgreSQL用のスキーマ定義とマイグレーションファイルを作成
## データモデル
### User(ユーザー)
id: bigint (主キー)
name: string
email: string (ユニーク)
password: string
created_at: timestamp
updated_at: timestamp
### Product(商品)
id: bigint (主キー)
name: string
description: text
price: decimal(10,2)
category: string
eco_score: integer
image_url: string
stock: integer
created_at: timestamp
updated_at: timestamp
### Order(注文)
id: bigint (主キー)
user_id: bigint (外部キー)
status: enum('pending', 'paid', 'shipped', 'delivered')
total_amount: decimal(10,2)
shipping_address: text
payment_method: string
created_at: timestamp
updated_at: timestamp
Kiroは自動生成後も人間のフィードバックを取り入れ、設計を反復改善します
Kiroによって設計されたデータベースモデルは、一貫性と拡張性を確保。要件変更時も素早く適応可能。
SE向けAI開発技術レクチャーシリーズ
© 2025 Tech Innovation Team