2024-08-04 20:18:54 +07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
device "github.com/tigorlazuardi/redmage/gen/proto/device/v1"
|
|
|
|
"github.com/tigorlazuardi/redmage/models"
|
|
|
|
)
|
|
|
|
|
|
|
|
// goverter:converter
|
|
|
|
// goverter:extend BoolToInt32
|
|
|
|
type Converter interface {
|
|
|
|
// goverter:map Nsfw NSFW
|
2024-08-04 20:53:51 +07:00
|
|
|
// goverter:ignore CreatedAt UpdatedAt R
|
|
|
|
CreateDeviceRequestToModelsDevice(source *device.CreateDeviceRequest) *models.Device
|
|
|
|
|
|
|
|
// goverter:ignore state sizeCache unknownFields
|
|
|
|
ModelsDeviceToCreateDeviceResponse(source *models.Device) *device.CreateDeviceResponse
|
2024-08-04 20:18:54 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
func BoolToInt32(input bool) int32 {
|
|
|
|
if input {
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|