บัญชีทดสอบ (Test Accounts)
หลังรัน
npx prisma db seedระบบจะสร้างบัญชีให้ใช้ทดสอบ
บัญชีทั้งหมด
ฝั่งร้าน — login ที่ /store/login
| Role | Password | สิทธิ์ | |
|---|---|---|---|
| Owner | admin@lumora.shop |
Admin1234! |
เห็น/ทำได้ทุกอย่าง |
| Manager | manager@lumora.shop |
Manager1234! |
เห็นทุกอย่าง ยกเว้น settings/staffs |
| Staff | staff@lumora.shop |
Staff1234! |
ดูออเดอร์ + แก้สินค้าได้ ไม่เห็น reports |
ฝั่งลูกค้า — login ที่ /login
| ผู้ใช้ | Password | หมายเหตุ | |
|---|---|---|---|
| Customer A | customer@example.com |
Customer1234! |
มีออเดอร์ตัวอย่าง + ที่อยู่ default |
| Customer B | customer2@example.com |
Customer1234! |
บัญชีเปล่า (ทดสอบ flow สมัครใหม่) |
ข้อมูลตัวอย่างที่ seed มาด้วย
หมวดหมู่ (4)
- เสื้อผ้า (clothing)
- รองเท้า (shoes)
- กระเป๋า (bags)
- เครื่องประดับ (accessories)
สินค้า (24 ชิ้น)
หมวด เสื้อผ้า (6):
- premium-t-shirt, cotton-t-shirt, polo-shirt
- linen-shirt, knit-sweater, denim-jacket
หมวด รองเท้า (6):
- white-sneakers, running-shoes, ankle-boots
- brown-loafers, canvas-slip-on, heeled-sandals
หมวด กระเป๋า (6):
- leather-tote, crossbody-bag, mini-backpack
- bucket-bag, clutch-evening, weekend-duffel
หมวด เครื่องประดับ (6):
- sunglasses, gold-watch, silk-scarf
- leather-belt, canvas-cap, pearl-necklace
แต่ละชิ้นมี: 3 รูป, ราคา, สต๊อก ~50 ชิ้น, บางชิ้นมี variants
คูปองตัวอย่าง
| Code | ส่วนลด | ขั้นต่ำ |
|---|---|---|
WELCOME10 |
10% | ฿500 |
FREESHIP |
฿80 | ฿1,000 |
SPRING500 |
฿500 (fixed) | ฿2,000 |
ออเดอร์ตัวอย่าง
Customer A มีออเดอร์ 3 ใบในสถานะต่างกัน:
- 1 ใบ
completed(เสร็จแล้ว) - 1 ใบ
shipping(กำลังจัดส่ง) - 1 ใบ
waiting_payment_review(รอตรวจสลิป)
ทำให้ลอง ดู order list + detail ได้โดยไม่ต้องสั่งเอง
reset ข้อมูลกลับเป็น seed
ถ้าทดสอบจนข้อมูลเละ — รีเซ็ตทั้งหมด:
cd ecommerce-api
npx prisma migrate reset
# ⚠ ลบข้อมูลทั้งหมด + run seed ใหม่
ดูข้อมูลในตารางตรง ๆ (debug)
cd ecommerce-api
npx prisma studio
# เปิด http://localhost:5555
GUI สามารถ:
- ดูทุก table
- แก้ field manual (เช่นเปลี่ยนสถานะออเดอร์ลัด)
- เปลี่ยน password (hash bcrypt ก่อน paste)
เปลี่ยน password ผ่าน script
cd ecommerce-api
node scripts/reset-password.ts admin@lumora.shop NewPassword123!
ขั้นต่อไป
- เริ่มลอง flow ทุกแบบ → 04 — Test Flows
- ใช้ API ตรง ๆ → 05 — API Testing
