diff --git a/backend/ent/group_create.go b/backend/ent/group_create.go index a7263051..f412fa40 100644 --- a/backend/ent/group_create.go +++ b/backend/ent/group_create.go @@ -425,20 +425,6 @@ func (_c *GroupCreate) SetNillableMessagesDispatchModelConfig(v *domain.OpenAIMe return _c } -// SetSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field. -func (_c *GroupCreate) SetSoraStorageQuotaBytes(v int64) *GroupCreate { - _c.mutation.SetSoraStorageQuotaBytes(v) - return _c -} - -// SetNillableSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field if the given value is not nil. -func (_c *GroupCreate) SetNillableSoraStorageQuotaBytes(v *int64) *GroupCreate { - if v != nil { - _c.SetSoraStorageQuotaBytes(*v) - } - return _c -} - // AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs. func (_c *GroupCreate) AddAPIKeyIDs(ids ...int64) *GroupCreate { _c.mutation.AddAPIKeyIDs(ids...) @@ -644,10 +630,6 @@ func (_c *GroupCreate) defaults() error { v := group.DefaultMessagesDispatchModelConfig _c.mutation.SetMessagesDispatchModelConfig(v) } - if _, ok := _c.mutation.SoraStorageQuotaBytes(); !ok { - v := group.DefaultSoraStorageQuotaBytes - _c.mutation.SetSoraStorageQuotaBytes(v) - } return nil } @@ -735,9 +717,6 @@ func (_c *GroupCreate) check() error { if _, ok := _c.mutation.MessagesDispatchModelConfig(); !ok { return &ValidationError{Name: "messages_dispatch_model_config", err: errors.New(`ent: missing required field "Group.messages_dispatch_model_config"`)} } - if _, ok := _c.mutation.SoraStorageQuotaBytes(); !ok { - return &ValidationError{Name: "sora_storage_quota_bytes", err: errors.New(`ent: missing required field "Group.sora_storage_quota_bytes"`)} - } return nil } @@ -885,10 +864,6 @@ func (_c *GroupCreate) createSpec() (*Group, *sqlgraph.CreateSpec) { _spec.SetField(group.FieldMessagesDispatchModelConfig, field.TypeJSON, value) _node.MessagesDispatchModelConfig = value } - if value, ok := _c.mutation.SoraStorageQuotaBytes(); ok { - _spec.SetField(group.FieldSoraStorageQuotaBytes, field.TypeInt64, value) - _node.SoraStorageQuotaBytes = value - } if nodes := _c.mutation.APIKeysIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -1525,24 +1500,6 @@ func (u *GroupUpsert) UpdateMessagesDispatchModelConfig() *GroupUpsert { return u } -// SetSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field. -func (u *GroupUpsert) SetSoraStorageQuotaBytes(v int64) *GroupUpsert { - u.Set(group.FieldSoraStorageQuotaBytes, v) - return u -} - -// UpdateSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field to the value that was provided on create. -func (u *GroupUpsert) UpdateSoraStorageQuotaBytes() *GroupUpsert { - u.SetExcluded(group.FieldSoraStorageQuotaBytes) - return u -} - -// AddSoraStorageQuotaBytes adds v to the "sora_storage_quota_bytes" field. -func (u *GroupUpsert) AddSoraStorageQuotaBytes(v int64) *GroupUpsert { - u.Add(group.FieldSoraStorageQuotaBytes, v) - return u -} - // UpdateNewValues updates the mutable fields using the new values that were set on create. // Using this option is equivalent to using: // @@ -2148,27 +2105,6 @@ func (u *GroupUpsertOne) UpdateMessagesDispatchModelConfig() *GroupUpsertOne { }) } -// SetSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field. -func (u *GroupUpsertOne) SetSoraStorageQuotaBytes(v int64) *GroupUpsertOne { - return u.Update(func(s *GroupUpsert) { - s.SetSoraStorageQuotaBytes(v) - }) -} - -// AddSoraStorageQuotaBytes adds v to the "sora_storage_quota_bytes" field. -func (u *GroupUpsertOne) AddSoraStorageQuotaBytes(v int64) *GroupUpsertOne { - return u.Update(func(s *GroupUpsert) { - s.AddSoraStorageQuotaBytes(v) - }) -} - -// UpdateSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field to the value that was provided on create. -func (u *GroupUpsertOne) UpdateSoraStorageQuotaBytes() *GroupUpsertOne { - return u.Update(func(s *GroupUpsert) { - s.UpdateSoraStorageQuotaBytes() - }) -} - // Exec executes the query. func (u *GroupUpsertOne) Exec(ctx context.Context) error { if len(u.create.conflict) == 0 { @@ -2940,27 +2876,6 @@ func (u *GroupUpsertBulk) UpdateMessagesDispatchModelConfig() *GroupUpsertBulk { }) } -// SetSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field. -func (u *GroupUpsertBulk) SetSoraStorageQuotaBytes(v int64) *GroupUpsertBulk { - return u.Update(func(s *GroupUpsert) { - s.SetSoraStorageQuotaBytes(v) - }) -} - -// AddSoraStorageQuotaBytes adds v to the "sora_storage_quota_bytes" field. -func (u *GroupUpsertBulk) AddSoraStorageQuotaBytes(v int64) *GroupUpsertBulk { - return u.Update(func(s *GroupUpsert) { - s.AddSoraStorageQuotaBytes(v) - }) -} - -// UpdateSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field to the value that was provided on create. -func (u *GroupUpsertBulk) UpdateSoraStorageQuotaBytes() *GroupUpsertBulk { - return u.Update(func(s *GroupUpsert) { - s.UpdateSoraStorageQuotaBytes() - }) -} - // Exec executes the query. func (u *GroupUpsertBulk) Exec(ctx context.Context) error { if u.create.err != nil { diff --git a/backend/ent/group_update.go b/backend/ent/group_update.go index fa398180..7b6d6193 100644 --- a/backend/ent/group_update.go +++ b/backend/ent/group_update.go @@ -567,27 +567,6 @@ func (_u *GroupUpdate) SetNillableMessagesDispatchModelConfig(v *domain.OpenAIMe return _u } -// SetSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field. -func (_u *GroupUpdate) SetSoraStorageQuotaBytes(v int64) *GroupUpdate { - _u.mutation.ResetSoraStorageQuotaBytes() - _u.mutation.SetSoraStorageQuotaBytes(v) - return _u -} - -// SetNillableSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field if the given value is not nil. -func (_u *GroupUpdate) SetNillableSoraStorageQuotaBytes(v *int64) *GroupUpdate { - if v != nil { - _u.SetSoraStorageQuotaBytes(*v) - } - return _u -} - -// AddSoraStorageQuotaBytes adds value to the "sora_storage_quota_bytes" field. -func (_u *GroupUpdate) AddSoraStorageQuotaBytes(v int64) *GroupUpdate { - _u.mutation.AddSoraStorageQuotaBytes(v) - return _u -} - // AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs. func (_u *GroupUpdate) AddAPIKeyIDs(ids ...int64) *GroupUpdate { _u.mutation.AddAPIKeyIDs(ids...) @@ -1051,12 +1030,6 @@ func (_u *GroupUpdate) sqlSave(ctx context.Context) (_node int, err error) { if value, ok := _u.mutation.MessagesDispatchModelConfig(); ok { _spec.SetField(group.FieldMessagesDispatchModelConfig, field.TypeJSON, value) } - if value, ok := _u.mutation.SoraStorageQuotaBytes(); ok { - _spec.SetField(group.FieldSoraStorageQuotaBytes, field.TypeInt64, value) - } - if value, ok := _u.mutation.AddedSoraStorageQuotaBytes(); ok { - _spec.AddField(group.FieldSoraStorageQuotaBytes, field.TypeInt64, value) - } if _u.mutation.APIKeysCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -1902,27 +1875,6 @@ func (_u *GroupUpdateOne) SetNillableMessagesDispatchModelConfig(v *domain.OpenA return _u } -// SetSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field. -func (_u *GroupUpdateOne) SetSoraStorageQuotaBytes(v int64) *GroupUpdateOne { - _u.mutation.ResetSoraStorageQuotaBytes() - _u.mutation.SetSoraStorageQuotaBytes(v) - return _u -} - -// SetNillableSoraStorageQuotaBytes sets the "sora_storage_quota_bytes" field if the given value is not nil. -func (_u *GroupUpdateOne) SetNillableSoraStorageQuotaBytes(v *int64) *GroupUpdateOne { - if v != nil { - _u.SetSoraStorageQuotaBytes(*v) - } - return _u -} - -// AddSoraStorageQuotaBytes adds value to the "sora_storage_quota_bytes" field. -func (_u *GroupUpdateOne) AddSoraStorageQuotaBytes(v int64) *GroupUpdateOne { - _u.mutation.AddSoraStorageQuotaBytes(v) - return _u -} - // AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs. func (_u *GroupUpdateOne) AddAPIKeyIDs(ids ...int64) *GroupUpdateOne { _u.mutation.AddAPIKeyIDs(ids...) @@ -2416,12 +2368,6 @@ func (_u *GroupUpdateOne) sqlSave(ctx context.Context) (_node *Group, err error) if value, ok := _u.mutation.MessagesDispatchModelConfig(); ok { _spec.SetField(group.FieldMessagesDispatchModelConfig, field.TypeJSON, value) } - if value, ok := _u.mutation.SoraStorageQuotaBytes(); ok { - _spec.SetField(group.FieldSoraStorageQuotaBytes, field.TypeInt64, value) - } - if value, ok := _u.mutation.AddedSoraStorageQuotaBytes(); ok { - _spec.AddField(group.FieldSoraStorageQuotaBytes, field.TypeInt64, value) - } if _u.mutation.APIKeysCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, diff --git a/backend/internal/config/platforms.go b/backend/internal/config/platforms.go index 2223dca5..65123105 100644 --- a/backend/internal/config/platforms.go +++ b/backend/internal/config/platforms.go @@ -15,7 +15,7 @@ type SoraClientConfig struct { PollIntervalSeconds int `mapstructure:"poll_interval_seconds"` MaxPollAttempts int `mapstructure:"max_poll_attempts"` RecentTaskLimit int `mapstructure:"recent_task_limit"` - RecentTaskLimitMax int `mapstructure="recent_task_limit_max"` + RecentTaskLimitMax int `mapstructure:"recent_task_limit_max"` Debug bool `mapstructure:"debug"` UseOpenAITokenProvider bool `mapstructure:"use_openai_token_provider"` Headers map[string]string `mapstructure:"headers"`