refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,26 @@
package models
import (
"time"
"git.apinb.com/bsm-sdk/core/database"
"git.apinb.com/bsm-sdk/core/types"
"gorm.io/gorm"
)
// 第三方登录配置表
type PassportProvider struct {
gorm.Model
types.Std_Passport
ID uint `gorm:"primaryKey" json:"id"`
Provider string `gorm:"type:varchar(20);index;not null" json:"provider"` // google, twitter, facebook, wechat, apple, custom
ProviderID string `gorm:"type:varchar(255);index;not null" json:"provider_id"` // 第三方平台的用户ID
Email string `gorm:"type:varchar(100)" json:"email"`
AccessToken string `gorm:"type:text" json:"-"`
RefreshToken string `gorm:"type:text" json:"-"`
ExpiresAt time.Time `json:"expires_at"`
}
func init() {
database.AppendMigrate(&PassportProvider{})
}