12345678910111213141516 |
- package db
- import (
- "context"
- "youngee_m_api/model/gorm_model"
- "youngee_m_api/model/http_model"
- )
- func SetServeratio(ctx context.Context, req *http_model.SetServeratioRequest) error {
- db := GetReadDB(ctx)
- serve_ratio := gorm_model.YounggeeServeRatio{Ratio: req.Ratio}
- if err := db.Create(&serve_ratio).Error; err != nil {
- return err
- }
- return nil
- }
|