33 lines
649 B
Swift
33 lines
649 B
Swift
//
|
|
// VehicleBrand.swift
|
|
// AutoCatCore
|
|
//
|
|
// Created by Selim Mustafaev on 13.06.2024.
|
|
// Copyright © 2024 Selim Mustafaev. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import RealmSwift
|
|
|
|
public final class VehicleBrand: Object{
|
|
|
|
@Persisted public var name: VehicleName?
|
|
@Persisted public var logo: String?
|
|
}
|
|
|
|
extension VehicleBrand: DtoConvertible {
|
|
|
|
public var dto: VehicleBrandDto {
|
|
|
|
VehicleBrandDto(name: name?.dto, logo: logo)
|
|
}
|
|
|
|
public convenience init(dto: VehicleBrandDto) {
|
|
|
|
self.init()
|
|
|
|
self.name = VehicleName(dto: dto.name)
|
|
self.logo = dto.logo
|
|
}
|
|
}
|