convert.go 312 Bytes
Newer Older
kzkzzzz's avatar
kzkzzzz committed
1
package handler
kzkzzzz's avatar
kzkzzzz committed
2 3

import (
kzkzzzz's avatar
kzkzzzz committed
4 5
	"hilo/api/service/demo"
	"hilo/app/service/demo/internal/model"
kzkzzzz's avatar
kzkzzzz committed
6 7 8 9 10 11 12 13 14 15 16
)

func DemoModelToRep(m *model.Demo) *demo.DemoModel {
	return &demo.DemoModel{
		Id:        int64(m.Id),
		Name:      m.Name,
		Value:     m.Value,
		CreatedAt: int64(m.CreatedAt),
		UpdatedAt: int64(m.UpdatedAt),
	}
}