kra-new/internal/service/dto/settings.go

164 lines
6.9 KiB
Go

package dto
import "time"
type DictionaryRequest struct {
ID uint `json:"ID" form:"ID"`
Name string `json:"name" form:"name"`
Type string `json:"type" form:"type"`
Status *bool `json:"status" form:"status"`
Description string `json:"desc" form:"desc"`
ParentID *uint `json:"parentID" form:"parentID"`
}
type DictionaryDetailRequest struct {
ID uint `json:"ID" form:"ID"`
Label string `json:"label" form:"label"`
Value string `json:"value" form:"value"`
Extend string `json:"extend" form:"extend"`
Status *bool `json:"status" form:"status"`
Sort int `json:"sort" form:"sort"`
DictionaryID uint `json:"sysDictionaryID" form:"sysDictionaryID"`
ParentID *uint `json:"parentID" form:"parentID"`
Level int `json:"level"`
Path string `json:"path"`
}
type ImportDictionaryRequest struct {
JSON string `json:"json"`
}
type DictionaryDetailsByParentRequest struct {
DictionaryID uint `json:"sysDictionaryID" form:"sysDictionaryID" binding:"required"`
ParentID *uint `json:"parentID" form:"parentID"`
IncludeChildren bool `json:"includeChildren" form:"includeChildren"`
}
type SystemParameterRequest struct {
ID uint `json:"ID" form:"ID"`
CreatedAt time.Time `json:"CreatedAt" form:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt" form:"UpdatedAt"`
Name string `json:"name" form:"name" binding:"required"`
Key string `json:"key" form:"key" binding:"required"`
Value string `json:"value" form:"value" binding:"required"`
Description string `json:"desc" form:"desc"`
}
type SystemParameterSearchRequest struct {
Page int `json:"page" form:"page"`
PageSize int `json:"pageSize" form:"pageSize"`
StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
EndCreatedAt *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
Name string `json:"name" form:"name"`
Key string `json:"key" form:"key"`
}
type CreateAPITokenRequest struct {
UserID uint `json:"userId"`
AuthorityID uint `json:"authorityId"`
Days int `json:"days"`
Remark string `json:"remark"`
}
type APITokenListRequest struct {
Page int `json:"page"`
PageSize int `json:"pageSize"`
UserID uint `json:"userId"`
Status *bool `json:"status"`
}
type APITokenResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt any `json:"-"`
UserID uint `json:"userId"`
AuthorityID uint `json:"authorityId"`
Token string `json:"token"`
Status bool `json:"status"`
ExpiresAt time.Time `json:"expiresAt"`
Remark string `json:"remark"`
User *UserResponse `json:"user"`
}
type SecurityConfigResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt any `json:"-"`
CaptchaOpen int `json:"captchaOpen"`
CaptchaTimeout int `json:"captchaTimeout"`
KeyLong int `json:"keyLong"`
ImgWidth int `json:"imgWidth"`
ImgHeight int `json:"imgHeight"`
PwdMinLength int `json:"pwdMinLength"`
PwdRequireUpper bool `json:"pwdRequireUpper"`
PwdRequireLower bool `json:"pwdRequireLower"`
PwdRequireDigit bool `json:"pwdRequireDigit"`
PwdRequireSpecial bool `json:"pwdRequireSpecial"`
LimitEnable bool `json:"limitEnable"`
LimitWindow int `json:"limitWindow"`
LimitCount int `json:"limitCount"`
LockEnable bool `json:"lockEnable"`
LockThreshold int `json:"lockThreshold"`
LockDuration int `json:"lockDuration"`
PwdExpireEnable bool `json:"pwdExpireEnable"`
PwdExpireDays int `json:"pwdExpireDays"`
ForceNewUserChangePassword bool `json:"forceNewUserChangePassword"`
}
type SystemParameterResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt any `json:"-"`
Name string `json:"name"`
Key string `json:"key"`
Value string `json:"value"`
Desc string `json:"desc"`
}
type DictionaryResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt any `json:"-"`
Name string `json:"name"`
Type string `json:"type"`
Status *bool `json:"status"`
Desc string `json:"desc"`
ParentID *uint `json:"parentID"`
Children []*DictionaryResponse `json:"children"`
SysDictionaryDetails []*DictionaryDetailResponse `json:"sysDictionaryDetails"`
}
type DictionaryDetailResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt any `json:"-"`
Label string `json:"label"`
Value string `json:"value"`
Extend string `json:"extend"`
Status *bool `json:"status"`
Sort int `json:"sort"`
DictionaryID uint `json:"sysDictionaryID"`
ParentID *uint `json:"parentID"`
Level int `json:"level"`
Path string `json:"path"`
Disabled bool `json:"disabled"`
Children []*DictionaryDetailResponse `json:"children"`
}
type DictionaryExportResponse struct {
Name string `json:"name"`
Type string `json:"type"`
Status *bool `json:"status"`
Desc string `json:"desc"`
SysDictionaryDetails []*DictionaryDetailExportResponse `json:"sysDictionaryDetails"`
}
type DictionaryDetailExportResponse struct {
Label string `json:"label"`
Value string `json:"value"`
Extend string `json:"extend"`
Status *bool `json:"status"`
Sort int `json:"sort"`
Level int `json:"level"`
Path string `json:"path"`
}