Sin descripción
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.

tenant_config.go 611B

12345678910111213141516171819202122
  1. package domain
  2. import (
  3. "git.x2erp.com/qdy/go-base/ctx"
  4. "git.x2erp.com/qdy/go-base/models"
  5. )
  6. // 租户配置信息
  7. type TenantConfig struct {
  8. models.BsonStringModel `bson:",inline"`
  9. AgentUrl string `bson:"agent_url,omitempty"`
  10. AgentConcurrency int `bson:"agent_concurrency,omitempty"`
  11. }
  12. // 构造函数,设置默认值
  13. func NewTenantConfig(ctx ctx.RequestContext, tenantId string, url string, concurrency int) *TenantConfig {
  14. return &TenantConfig{
  15. BsonStringModel: models.NewStringIDModelWithID(ctx, tenantId),
  16. AgentConcurrency: concurrency,
  17. AgentUrl: url,
  18. }
  19. }