diff --git a/MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs b/MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs index e6bd746..466866f 100644 --- a/MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs +++ b/MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs @@ -23,7 +23,7 @@ public partial class EntityLinker public string ClassName => _className; public string Path => _path; - public string FieldName => _className.ToLower().Underscore(); + public string FieldName => _className.Underscore().ToLower(); public string TableName => GetOriginalText(_tableCtx) .Replace("__tablename__", string.Empty) diff --git a/MycroForge.CLI/Features/Api.cs b/MycroForge.CLI/Features/Api.cs index 93068f6..1ddad1d 100644 --- a/MycroForge.CLI/Features/Api.cs +++ b/MycroForge.CLI/Features/Api.cs @@ -40,6 +40,12 @@ public sealed class Api : IFeature return; } + await Bash.ExecuteAsync( + "source .venv/bin/activate", + "python3 -m pip install fastapi uvicorn[standard]", + "python3 -m pip freeze > requirements.txt" + ); + await context.CreateFile("api/routers/hello.py", HelloRouter); var main = await context.ReadFile("main.py");