Add WmsLite monorepo with JWT auth, tenant context, and project READMEs.
Implement API security baseline (sys_user, JWT, audit fields, transactions, unique constraints) and Web real login with 401 handling. Document setup and development workflows in root, WmsLite.Api, and WmsLite.Web README files. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
fa1b286463
241 files changed
+31188
No files matched your search
@@ -0,0 +1,36 @@
|
||||
using FluentMigrator;
|
||||
|
||||
namespace WmsLite.Api.Database.Migrations;
|
||||
|
||||
[Migration(13, "Order number counter table")]
|
||||
public class OrderNoCounter0013 : Migration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
if (!Schema.Table("order_no_counter").Exists())
|
||||
{
|
||||
Create.Table("order_no_counter")
|
||||
.WithColumn("id").AsInt64().PrimaryKey().NotNullable()
|
||||
.WithColumn("tenant_id").AsString(64).NotNullable()
|
||||
.WithColumn("owner_code").AsString(64).NotNullable()
|
||||
.WithColumn("prefix").AsString(16).NotNullable()
|
||||
.WithColumn("date_yyyymmdd").AsString(8).NotNullable()
|
||||
.WithColumn("last_seq").AsInt32().NotNullable().WithDefaultValue(0)
|
||||
.WithColumn("create_time").AsDateTime().Nullable()
|
||||
.WithColumn("update_time").AsDateTime().Nullable();
|
||||
}
|
||||
|
||||
Execute.Sql("""
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_order_no_counter_scope
|
||||
ON order_no_counter (tenant_id, owner_code, prefix, date_yyyymmdd);
|
||||
""");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
if (Schema.Table("order_no_counter").Exists())
|
||||
{
|
||||
Delete.Table("order_no_counter");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user