forked from longtao.wu/droboticflow
37 lines
1.6 KiB
Go
37 lines
1.6 KiB
Go
package domain
|
|
|
|
// AcceptancePriority changes admission order only, never production ownership or access.
|
|
// Empty ProjectIDs means all production projects in this organization.
|
|
type AcceptancePriority struct {
|
|
ID string `json:"-" bson:"_id"`
|
|
OrganizationID string `json:"-" bson:"organizationId"`
|
|
SupplierID string `json:"supplierId" bson:"supplierId"`
|
|
Enabled bool `json:"enabled" bson:"enabled"`
|
|
ProjectIDs []string `json:"projectIds" bson:"projectIds"`
|
|
ExpiresAt string `json:"expiresAt" bson:"expiresAt"`
|
|
Version int `json:"version" bson:"version"`
|
|
UpdatedAt string `json:"updatedAt,omitempty" bson:"updatedAt"`
|
|
UpdatedBy string `json:"updatedBy,omitempty" bson:"updatedBy"`
|
|
History []AcceptancePriorityChange `json:"-" bson:"history"`
|
|
}
|
|
type AcceptancePriorityChange struct {
|
|
Enabled bool `bson:"enabled"`
|
|
ProjectIDs []string `bson:"projectIds"`
|
|
ExpiresAt string `bson:"expiresAt"`
|
|
ActorID string `bson:"actorId"`
|
|
At string `bson:"at"`
|
|
}
|
|
|
|
// Counts are partitioned by the facts, independent of mutable policy versions.
|
|
type AcceptanceCount struct {
|
|
ProjectID string `bson:"projectId"`
|
|
SupplierID string `bson:"supplierId"`
|
|
Count int `bson:"count"`
|
|
}
|
|
|
|
type AcceptanceSnapshot struct {
|
|
OrganizationID string `bson:"_id"`
|
|
CompletedAt string `bson:"completedAt"`
|
|
Counts []AcceptanceCount `bson:"counts"`
|
|
}
|