Refactor WeChat integration to support multiple mini programs, removing hardcoded WeChat credentials and updating user model and authentication flow accordingly.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type MiniProgram struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
|
||||
Name string `gorm:"size:100;not null" json:"name"`
|
||||
AppID string `gorm:"size:100;uniqueIndex" json:"app_id"`
|
||||
AppSecret string `gorm:"size:200;not null" json:"-"`
|
||||
Description string `gorm:"size:255" json:"description"`
|
||||
}
|
||||
|
||||
func (MiniProgram) TableName() string {
|
||||
return "mini_programs"
|
||||
}
|
||||
Reference in New Issue
Block a user