feat: add object storage and points leaderboard

This commit is contained in:
richjohnrambo
2026-10-18 18:11:34 +08:00
parent bce5edfaf5
commit b79b781f15
24 changed files with 359 additions and 212 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ import "context"
type AttachmentCreation struct {
MemberID int64
Drive string
Name string
MimeType string
Path string
@@ -21,8 +22,8 @@ type Attachment struct {
func (s *Store) CreateAttachment(ctx context.Context, input AttachmentCreation) (*Attachment, error) {
result, err := s.db.ExecContext(ctx, `INSERT INTO hg_sys_attachment
(app_id,member_id,cate_id,drive,name,kind,mime_type,naive_type,path,file_url,size,ext,md5,status,created_at,updated_at)
VALUES('olons_server',?,0,'local',?,'image',?,'image',?,?,?, ?,?,1,UTC_TIMESTAMP(),UTC_TIMESTAMP())`,
input.MemberID, input.Name, input.MimeType, input.Path, input.URL, input.Size, input.Ext, input.MD5)
VALUES('olons_server',?,0,?,?,'image',?,'image',?,?,?, ?,?,1,UTC_TIMESTAMP(),UTC_TIMESTAMP())`,
input.MemberID, input.Drive, input.Name, input.MimeType, input.Path, input.URL, input.Size, input.Ext, input.MD5)
if err != nil {
return nil, err
}