Cleaned up project and added constraints for SQLAlchemy types in generate entity

This commit is contained in:
2024-07-24 07:18:42 +02:00
parent 91431fd996
commit 32b7a3c01c
16 changed files with 186 additions and 146 deletions

View File

@@ -0,0 +1,12 @@
namespace MycroForge.CLI.Commands.Attributes;
public class RequiresVenvAttribute : Attribute
{
public string Path => System.IO.Path.Join(Environment.CurrentDirectory, ".venv");
public void RequireVenv(string command)
{
if (!File.Exists(System.IO.Path.Join(Environment.CurrentDirectory, Path)))
throw new($"Command '{command}' requires directory {Path}");
}
}