-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Fixed the image and document summary
- Loading branch information
1 parent
d418719
commit 05b0956
Showing
8 changed files
with
194 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
package models | ||
|
||
import ( | ||
"github.com/jinzhu/gorm" | ||
) | ||
|
||
type SyncData struct { | ||
gorm.Model | ||
UserID uint `gorm:"unique;not null" json:"user_id"` | ||
ContentType string `gorm:"not null"` | ||
Age int `gorm:"not null"` | ||
QueryText string `gorm:"not null"` | ||
FeelingLevel string `gorm:"not null"` // happy, sad, angry, confused, confident, tired | ||
|
||
ImageURL string | ||
DocumentURL string | ||
ID uint `gorm:"primary_key"` | ||
UserID uint `gorm:"uniqueIndex"` | ||
ContentType string | ||
Age int | ||
QueryText string | ||
FeelingLevel string | ||
ImageURL string | ||
DocumentURL string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
package models | ||
|
||
import "github.com/jinzhu/gorm" | ||
|
||
type SyncStatus string | ||
|
||
const ( | ||
StatusInProgress SyncStatus = "inProgress" | ||
StatusDone SyncStatus = "done" | ||
StatusErrored SyncStatus = "errored" | ||
StatusNotFound SyncStatus = "notFound" | ||
) | ||
|
||
type SyncDescription struct { | ||
gorm.Model | ||
UserID uint `gorm:"not null"` | ||
SyncDataID uint `gorm:"not null"` | ||
ImageSummary string `gorm:"type:text"` | ||
DocumentSummary string `gorm:"type:text"` | ||
ImageStatus SyncStatus `gorm:"not null"` | ||
DocumentStatus SyncStatus `gorm:"not null"` | ||
ID uint `gorm:"primary_key"` | ||
UserID uint `gorm:"uniqueIndex"` | ||
SyncDataID uint | ||
ImageURL string | ||
ImageSummary string | ||
ImageStatus SyncStatus | ||
DocumentURL string | ||
DocumentSummary string | ||
DocumentStatus SyncStatus | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package models | ||
|
||
type SyncStatus string | ||
|
||
const ( | ||
StatusInProgress SyncStatus = "InProgress" | ||
StatusDone SyncStatus = "Done" | ||
StatusErrored SyncStatus = "Errored" | ||
StatusNotFound SyncStatus = "NotFound" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.