feat: 代码生成
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package codegen
|
||||
|
||||
// PreviewFile 预览的单个文件
|
||||
type PreviewFile struct {
|
||||
FilePath string `json:"filePath"` // 相对于输出目录的路径
|
||||
Content string `json:"content"` // 文件内容
|
||||
AlwaysOverwrite bool `json:"alwaysOverwrite,omitempty"` // 聚合文件(如 enter.go),始终覆盖
|
||||
}
|
||||
|
||||
// GenResult 代码生成结果
|
||||
type GenResult struct {
|
||||
OutputDir string `json:"outputDir"` // 实际输出目录
|
||||
Files []PreviewFile `json:"files"` // 生成的文件列表
|
||||
Message string `json:"message"` // 生成结果说明
|
||||
}
|
||||
Reference in New Issue
Block a user