SoXX
0e6a8fd61e
added more columns BREAKING-CHANGE: breaks database compatibility to older SDK versions
22 lines
751 B
Go
22 lines
751 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type UserSource struct {
|
|
BaseModel[UserSourceID]
|
|
User User `json:"user" gorm:"foreignKey:ID;references:UserID"`
|
|
UserID UserID `json:"user_id"`
|
|
Source Source `json:"source" gorm:"foreignKey:ID;references:SourceID"`
|
|
SourceID SourceID `json:"source_id"`
|
|
ScrapeTimeInterval string `json:"scrape_time_interval"`
|
|
AccountUsername string `json:"account_username"`
|
|
AccountID string `json:"account_id"`
|
|
LastScrapeTime time.Time `json:"last_scrape_time"`
|
|
AccountValidate bool `json:"account_validate"`
|
|
AccountValidationKey string `json:"-"`
|
|
}
|
|
|
|
func (UserSource) TableName() string {
|
|
return "UserSource"
|
|
}
|