Implemented the Word and WordCount models in the Filter library.
This commit is contained in:
parent
72a8e77fc7
commit
2e52732300
24
Libraries/Filter/Kit/Sources/Models/Word.swift
Normal file
24
Libraries/Filter/Kit/Sources/Models/Word.swift
Normal file
@ -0,0 +1,24 @@
|
||||
//
|
||||
// Word.swift
|
||||
// ReviewsFilterKit
|
||||
//
|
||||
// Created by Javier Cicchelli on 18/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||
//
|
||||
|
||||
public struct Word: Equatable {
|
||||
|
||||
// MARK: Constants
|
||||
public let term: String
|
||||
public let token: String
|
||||
|
||||
// MARK: Initialisers
|
||||
public init(
|
||||
term: String,
|
||||
token: String
|
||||
) {
|
||||
self.term = term
|
||||
self.token = token
|
||||
}
|
||||
|
||||
}
|
24
Libraries/Filter/Kit/Sources/Models/WordCount.swift
Normal file
24
Libraries/Filter/Kit/Sources/Models/WordCount.swift
Normal file
@ -0,0 +1,24 @@
|
||||
//
|
||||
// WordCount.swift
|
||||
// ReviewsFilterKit
|
||||
//
|
||||
// Created by Javier Cicchelli on 18/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||
//
|
||||
|
||||
public struct WordCount: Equatable {
|
||||
|
||||
// MARK: Constants
|
||||
public let count: Int
|
||||
public let word: Word
|
||||
|
||||
// MARK: Initialisers
|
||||
public init(
|
||||
word: Word,
|
||||
count: Int
|
||||
) {
|
||||
self.count = count
|
||||
self.word = word
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user