Parcourir la source

fix: 减少username和model_name字段长度为64

CaIon il y a 2 ans
Parent
commit
f3124e7252
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      model/usedata.go

+ 2 - 2
model/usedata.go

@@ -11,8 +11,8 @@ import (
 type QuotaData struct {
 	Id        int    `json:"id"`
 	UserID    int    `json:"user_id" gorm:"index"`
-	Username  string `json:"username" gorm:"index:idx_qdt_model_user_name,priority:2;size:100;default:''"`
-	ModelName string `json:"model_name" gorm:"index;index:idx_qdt_model_user_name,priority:1;size:100;default:''"`
+	Username  string `json:"username" gorm:"index:idx_qdt_model_user_name,priority:2;size:64;default:''"`
+	ModelName string `json:"model_name" gorm:"index;index:idx_qdt_model_user_name,priority:1;size:64;default:''"`
 	CreatedAt int64  `json:"created_at" gorm:"bigint;index:idx_qdt_created_at,priority:2"`
 	Count     int    `json:"count" gorm:"default:0"`
 	Quota     int    `json:"quota" gorm:"default:0"`