refactor: 全部源文件重命名为蛇形命名(Orm.cj→orm.cj、MigrationRegistry.cj→migration_registry.cj 等 27 个),同步迁移 CLI 注册文件路径与测试,消除 G.NAM.02 警告,版本 1.3.1
This commit is contained in:
1 parent
95b18084d5
commit
985473b8a7
29 files changed
+7
-7
No files matched your search
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2025 SimcuTeam. All rights reserved.
|
||||
* CLI 上下文契约:MigrationCli 只依赖本接口,不依赖 simcu::orm.db,
|
||||
* 从而避免 db → cli 与 cli → db 的包循环依赖。
|
||||
*
|
||||
* DbContext 实现本接口(DbContext.cli(args) 内部把 this 传给 MigrationCli.runOn)。
|
||||
*/
|
||||
|
||||
package simcu::orm.cli
|
||||
|
||||
import std.collection.*
|
||||
import std.database.sql.*
|
||||
import simcu::orm.migrations.*
|
||||
import simcu::orm.model.*
|
||||
import simcu::orm.sql.*
|
||||
|
||||
public interface CliContext {
|
||||
/// 模型列表(由实例的 DbSet<T> 属性反射收集)
|
||||
func getModels(): ArrayList<EntityModel>
|
||||
/// 应用主数据源
|
||||
func getDatasource(): Datasource
|
||||
/// SQL 方言
|
||||
func getDialect(): ISqlDialect
|
||||
/// 迁移列表(子类 override migrations() 提供)
|
||||
func getMigrations(): ArrayList<Migration>
|
||||
/// 应用所有迁移
|
||||
func migrateAll(migrations: ArrayList<Migration>): Int64
|
||||
/// 数据填充运行上下文:返回应用自己的 DbContext 实例(seed 的 run(ctx) 参数)
|
||||
func getSeedContext(): Any
|
||||
}
|
||||
Reference in new issue
Block a user