thread-master/backend/internal/model/publish_inventory/domain/entity/policy.go

33 lines
1.3 KiB
Go

package entity
const CollectionName = "publish_inventory_policies"
type Slot struct {
Weekday int `bson:"weekday" json:"weekday"`
Time string `bson:"time" json:"time"`
}
type SourceRef struct {
Type string `bson:"type" json:"type"`
PersonaID string `bson:"persona_id,omitempty" json:"persona_id,omitempty"`
CopyMissionID string `bson:"copy_mission_id,omitempty" json:"copy_mission_id,omitempty"`
ScanPostID string `bson:"scan_post_id,omitempty" json:"scan_post_id,omitempty"`
ManualSeed string `bson:"manual_seed,omitempty" json:"manual_seed,omitempty"`
}
type Policy struct {
ID string `bson:"_id"`
TenantID string `bson:"tenant_id"`
OwnerUID string `bson:"owner_uid"`
AccountID string `bson:"account_id"`
Enabled bool `bson:"enabled"`
TargetDailyCount int `bson:"target_daily_count"`
LowStockThreshold int `bson:"low_stock_threshold"`
LookaheadDays int `bson:"lookahead_days"`
Timezone string `bson:"timezone"`
Slots []Slot `bson:"slots,omitempty"`
SourceRefs []SourceRef `bson:"source_refs,omitempty"`
CreateAt int64 `bson:"create_at"`
UpdateAt int64 `bson:"update_at"`
}