暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

etl_config.go 1.1KB

12345678910111213141516171819202122232425262728293031
  1. package model
  2. import (
  3. "fmt"
  4. "git.x2erp.com/qdy/go-base/ctx"
  5. "git.x2erp.com/qdy/go-base/model/bson"
  6. )
  7. // 租户配置信息
  8. type ETLConfig struct {
  9. bson.BsonStringModel `bson:",inline"`
  10. AgentDatabaseId string `bson:"agent_database_id,omitempty"`
  11. AgentChangeCountSQL string `bson:"agent_change_count_sql,omitempty"`
  12. AgentChangeQuerySQL string `bson:"agent_change_query_sql,omitempty"`
  13. AgentFullCountSQL string `bson:"agent_full_count_sql,omitempty"`
  14. AgentFullQuerySQL string `bson:"agent_full_query_sql,omitempty"`
  15. DorisDatabaseName string `bson:"doris_database_name,omitempty"`
  16. DorisTabelNsme string `bson:"doris_tabel_nsme,omitempty"`
  17. }
  18. // 构造函数,设置默认值
  19. func NewETLConfig(ctx *ctx.RequestContext, agentDatabaseId, dorisDatabaseName, dorisTableName string) *ETLConfig {
  20. id := fmt.Sprintf("%s.%s.%s", ctx.TenantID, dorisDatabaseName, dorisTableName)
  21. return &ETLConfig{
  22. BsonStringModel: bson.NewStringIDModelWithID(ctx, id),
  23. AgentDatabaseId: agentDatabaseId,
  24. DorisDatabaseName: dorisDatabaseName,
  25. DorisTabelNsme: dorisTableName,
  26. }
  27. }