Skip to main content

monolith-model-development

Use when creating or modifying GORM models in app/models, including generator usage, CRUD helper patterns, hooks, and migration registration.

소스 정보

저장소
cggonzal/monolith
최근 소스 활동
2026년 2월 14일 03:11
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
monolith-model-development
description
Use when creating or modifying GORM models in app/models, including generator usage, CRUD helper patterns, hooks, and migration registration.
# Monolith Model Development ## Use this skill when - Adding a new persisted domain entity. - Updating schema and model helpers. ## Default approach 1. Scaffold with `make generator model <Name> field:type...` when possible. 2. Confirm model is added to `db/db.go` AutoMigrate list. 3. Add/adjust helper functions in `app/models/<name>.go`. 4. Add tests under `app/models/*_test.go` and run `go test ./...`. ## Expected model conventions - Embed `gorm.Model`. - Include `IsActive bool` soft-delete style flag. - Provide CRUD helpers (`CreateX`, `GetXByID`, `GetAllXs`, `UpdateX`, `DeleteX`). - Keep validation in hooks (`BeforeSave`/`AfterSave`) or explicit helper functions. ## If you need full REST scaffolding Use `make generator resource <singular> field:type...`. This will create model + controller + routes + views in one pass. ## Migration notes - Auto migration occurs during `db.InitDB()` on startup. - Adding a model without registering it in AutoMigrate means no schema creation.
GitHub에서 보기