TranslationModel.swift 707 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // TranslationModel.swift
  3. // Learn Genie
  4. //
  5. // Created by Suraj Kumar Mandal on 03/09/21.
  6. //
  7. import Foundation
  8. import RealmSwift
  9. class TranslationModel: Object {
  10. @objc dynamic var id = 0
  11. @objc dynamic var originalText = ""
  12. @objc dynamic var languageId = 0
  13. @objc dynamic var translatedText = ""
  14. override static func primaryKey() -> String? {
  15. return "id"
  16. }
  17. convenience init(id:Int, originalText:String, languageId:Int, translatedText:String) {
  18. self.init()
  19. self.id = id
  20. self.originalText = originalText
  21. self.languageId = languageId
  22. self.translatedText = translatedText
  23. }
  24. }