Implemented the Word and WordCount models in the Filter library.

This commit is contained in:
Javier Cicchelli 2024-03-18 10:56:44 +01:00
parent 72a8e77fc7
commit 2e52732300
2 changed files with 48 additions and 0 deletions

View 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
}
}

View 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
}
}