mycroforge/MycroForge.CLI/Commands/MycroForge.Entity.Link.Many.cs
2024-04-23 08:56:01 +02:00

37 lines
1.2 KiB
C#

using System.CommandLine;
using MycroForge.CLI.Commands.Interfaces;
namespace MycroForge.CLI.Commands;
public partial class MycroForge
{
public partial class Entity
{
public partial class Link
{
public class Many : Command, ISubCommandOf<Link>
{
private static readonly Argument<string> NameArgument =
new(name: "primary", description: "The left side of the relation");
private static readonly Option<string> ToOneOption =
new(name: "--to-one", description: "The right side of the relation");
private static readonly Option<string> ToManyOption =
new(name: "--to-many", description: "The right side of the relation");
public Many() : base("many", "Define a n:m relation")
{
AddArgument(NameArgument);
AddOption(ToOneOption);
AddOption(ToManyOption);
this.SetHandler(ExecuteAsync);
}
private async Task ExecuteAsync()
{
}
}
}
}
}