2024-07-19 08:03:35 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type UserSource struct {
|
2024-08-09 19:37:54 +00:00
|
|
|
BaseModel[UserSourceID]
|
2024-07-19 08:03:35 +00:00
|
|
|
User User `json:"user" gorm:"foreignKey:ID;references:UserID"`
|
2024-08-09 19:37:54 +00:00
|
|
|
UserID UserID `json:"user_id"`
|
2024-07-19 08:03:35 +00:00
|
|
|
Source Source `json:"source" gorm:"foreignKey:ID;references:SourceID"`
|
2024-08-09 19:37:54 +00:00
|
|
|
SourceID SourceID `json:"source_id"`
|
2024-07-19 08:03:35 +00:00
|
|
|
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"`
|
2024-08-13 08:54:21 +00:00
|
|
|
AccountValidationKey string `json:"account_validation_key"`
|
2024-07-19 08:03:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (UserSource) TableName() string {
|
|
|
|
return "UserSource"
|
|
|
|
}
|