1
0

fix data -1

This commit is contained in:
2024-02-06 07:21:38 +09:00
parent f1bfdf41fb
commit f7df1224e0
10 changed files with 68 additions and 9 deletions

View File

@ -129,7 +129,7 @@ var (
{Name: "ten_post", Type: field.TypeString, Nullable: true},
{Name: "ten_get", Type: field.TypeString, Nullable: true},
{Name: "ten_at", Type: field.TypeTime, Nullable: true},
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240203"},
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240213"},
{Name: "room", Type: field.TypeInt, Nullable: true},
{Name: "model", Type: field.TypeBool, Nullable: true},
{Name: "model_at", Type: field.TypeTime, Nullable: true},

View File

@ -198,8 +198,8 @@ func (h *OgentHandler) UpdateCard(ctx context.Context, req *UpdateCardReq, param
// DeleteCard handles DELETE /cards/{id} requests.
func (h *OgentHandler) DeleteCard(ctx context.Context, params DeleteCardParams) (DeleteCardRes, error) {
//err := h.client.Card.DeleteOneID(params.ID).Exec(ctx)
err := h.client.Card.DeleteOneID(0).Exec(ctx)
err := h.client.Card.DeleteOneID(params.ID).Exec(ctx)
//err := h.client.Card.DeleteOneID(0).Exec(ctx)
if err != nil {
switch {
case ent.IsNotFound(err):

View File

@ -19,8 +19,9 @@ type User struct {
}
func Nextime() (tt string){
t := time.Now().In(jst)
//t := time.Now().Add(time.Hour * 24 * 1).In(jst)
//t := time.Now().In(jst)
//t := time.Now().Add(time.Hour * 24 * 1).In(jst)
t := time.Now().AddDate(0, 0, -1).In(jst)
tt = t.Format("20060102")
return
}