This commit is contained in:
coward
2024-07-05 14:41:35 +08:00
commit 1f7f57ec9f
70 changed files with 4923 additions and 0 deletions

18
model/other.go Normal file
View File

@@ -0,0 +1,18 @@
package model
type RequestLog struct {
Base
UserId string `json:"userId" gorm:"type:char(40);comment:'用户id'"`
ClientIP string `json:"clientIP" gorm:"type:varchar(60);not null;comment:'客户端IP'"`
Host string `json:"host" gorm:"type:varchar(255);not null;comment:'请求域名'"`
Method string `json:"method" gorm:"type:varchar(20);not null;comment:'请求方法[GET POST DELETE PUT PATCH]'"`
Uri string `json:"uri" gorm:"type:varchar(255);not null;comment:'请求path'"`
Header string `json:"header" gorm:"type:text;comment:'请求头'"`
Body string `json:"body" gorm:"type:text;comment:'请求体'"`
Form string `json:"form" gorm:"type:text;comment:'请求表单'"`
Query string `json:"query" gorm:"type:text;comment:'请求query'"`
UserAgent string `json:"userAgent" gorm:"type:text;comment:'ua信息'"`
Cost int64 `json:"cost" gorm:"type:int(10);comment:'请求耗时'"`
StatusCode int `json:"statusCode" gorm:"type:int(10);comment:'响应状态码'"`
Response string `json:"response" gorm:"type:text;comment:'返回数据'"`
}