up gorm logger & add share to guest by web client

This commit is contained in:
ljw committed 2024-10-09 15:53:08 +08:00
1 parent 2ab61512cf
commit 8b266d4fee
23 files changed
+451 -1031

No files matched your search

+17
View File
@@ -85,3 +85,20 @@ type AddressBookQuery struct {
Id string `form:"id"`
PageQuery
}
type ShareByWebClientForm struct {
Id string `json:"id" validate:"required"`
PasswordType string `json:"password_type" validate:"required,oneof=once fixed"` //只能是once,fixed
Password string `json:"password" validate:"required"`
Expire int64 `json:"expire"`
}
func (sbwcf ShareByWebClientForm) ToShareRecord() *model.ShareRecord {
return &model.ShareRecord{
UserId: 0,
PeerId: sbwcf.Id,
PasswordType: sbwcf.PasswordType,
Password: sbwcf.Password,
Expire: sbwcf.Expire,
}
}