Files
be.ems/src/modules/oauth2/model/oauth2_client.go
TsMask 56991a0b49 feat: Implement Oauth2 login log service and repository
- Added Oauth2LogLoginService for managing user authorization logs.
- Implemented methods for inserting logs, cleaning logs, and exporting log data.
- Created a new file for Oauth2 login log service.

refactor: Remove unused open_api module

- Deleted the open_api.go file as it was not utilized in the project.

fix: Update error codes in SysProfileController

- Changed error codes for binding errors and user authentication errors to more descriptive values.

fix: Update cache handling in SysConfig and SysDictType services

- Modified Redis set operations to include expiration time for cached values.

refactor: Update middleware authorization checks

- Replaced PreAuthorize middleware with AuthorizeUser across multiple routes in system and tool modules for consistency.

chore: Clean up trace and ws modules

- Updated middleware authorization in trace and ws modules to use AuthorizeUser.
2025-04-27 11:07:34 +08:00

23 lines
1.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
// Oauth2Client 用户授权第三方应用表 oauth2_client
type Oauth2Client struct {
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"` // 应用ID
ClientId string `gorm:"column:client_id" json:"clientId"` // 应用的唯一标识
ClientSecret string `gorm:"column:client_secret" json:"clientSecret"` // 应用的凭证秘钥
Title string `gorm:"column:title" json:"title"` // 应用名称
IPWhite string `gorm:"column:ip_white" json:"ipWhite"` // IP白名单
DelFlag string `gorm:"column:del_flag" json:"delFlag"` // 删除标记0存在 1删除
LoginIp string `gorm:"column:login_ip" json:"loginIp"` // 最后登录IP
LoginTime int64 `gorm:"column:login_time" json:"loginTime"` // 最后登录时间
CreateBy string `gorm:"column:create_by" json:"createBy"` // 创建者
CreateTime int64 `gorm:"column:create_time" json:"createTime"` // 创建时间
UpdateBy string `gorm:"column:update_by" json:"updateBy"` // 更新者
UpdateTime int64 `gorm:"column:update_time" json:"updateTime"` // 更新时间
Remark string `gorm:"column:remark" json:"remark"` // 备注
}
func (*Oauth2Client) TableName() string {
return "oauth2_client"
}