Skip to content

Instantly share code, notes, and snippets.

@chashmeetsingh
Last active June 9, 2017 00:03
Show Gist options
  • Save chashmeetsingh/ad393e5f9b657e9730285a80301044b3 to your computer and use it in GitHub Desktop.
Save chashmeetsingh/ad393e5f9b657e9730285a80301044b3 to your computer and use it in GitHub Desktop.
//
// NewModel.swift
// Susi
//
// Created by Chashmeet Singh on 2017-06-08.
// Copyright © 2017 FOSSAsia. All rights reserved.
//
import RealmSwift
import Realm
import Foundation
enum ActionType: String {
case answer
case websearch
case piechart
case rss
case table
case map
}
class MessageNew: Object {
dynamic var actionType = [String]()
dynamic var expression: String = ""
dynamic var queryDate = NSDate()
dynamic var answerDate = NSDate()
dynamic var mood: String?
dynamic var query: String = ""
dynamic var data = [AnyObject]()
dynamic var isSent = false
dynamic var isMarked = false
}
class RSS: Object {
dynamic var title: String = ""
dynamic var desc: String = ""
dynamic var link: String = ""
}
class WebsearchData: Object {
dynamic var shortenedURL: String = ""
dynamic var title: String = ""
dynamic var desc: String = ""
dynamic var image: String = ""
}
class Table: Object {
dynamic var size: Int = 0
dynamic var columns = [String]()
}
class Map: Object {
dynamic var link: String = ""
dynamic var text: String = ""
}
class Anchor: Object {
dynamic var latitude: Double = 0.0
dynamic var longitude: Double = 0.0
dynamic var zoom: Double = 0.0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment