Skip to content

Commit

Permalink
feat: Update solver database models to use milli timestamps (#505)
Browse files Browse the repository at this point in the history
feat: Update solver database models to milli timestamps
  • Loading branch information
bgins authored Jan 31, 2025
1 parent a6ddf89 commit bc23295
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/solver/store/db/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type JobOffer struct {
gorm.Model
gorm.Model `gorm:"type:timestamp(3) with time zone"`
CID string `gorm:"index"`
JobCreator string `gorm:"index"`
DealID string `gorm:"index"`
Expand All @@ -16,7 +16,7 @@ type JobOffer struct {
}

type ResourceOffer struct {
gorm.Model
gorm.Model `gorm:"type:timestamp(3) with time zone"`
CID string `gorm:"index"`
ResourceProvider string `gorm:"index"`
DealID string `gorm:"index"`
Expand All @@ -25,7 +25,7 @@ type ResourceOffer struct {
}

type Deal struct {
gorm.Model
gorm.Model `gorm:"type:timestamp(3) with time zone"`
CID string `gorm:"index"`
JobCreator string `gorm:"index"`
ResourceProvider string `gorm:"index"`
Expand All @@ -35,14 +35,14 @@ type Deal struct {
}

type Result struct {
gorm.Model
gorm.Model `gorm:"type:timestamp(3) with time zone"`
DealID string `gorm:"index"` // We query with deal ID for now
CID string
Attributes datatypes.JSONType[data.Result]
}

type MatchDecision struct {
gorm.Model
gorm.Model `gorm:"type:timestamp(3) with time zone"`
ResourceOffer string `gorm:"primaryKey"`
JobOffer string `gorm:"primaryKey"`
Attributes datatypes.JSONType[data.MatchDecision]
Expand Down

0 comments on commit bc23295

Please sign in to comment.