2020-10-27 01:10:18 +01:00
|
|
|
import { ObjectWithId } from './object-with-id';
|
|
|
|
|
|
|
|
|
|
export class MatchingModel extends ObjectWithId {
|
|
|
|
|
|
2020-10-28 18:04:50 +01:00
|
|
|
static MATCH_ANY = 1
|
|
|
|
|
static MATCH_ALL = 2
|
|
|
|
|
static MATCH_LITERAL = 3
|
|
|
|
|
static MATCH_REGEX = 4
|
|
|
|
|
static MATCH_FUZZY = 5
|
|
|
|
|
static MATCH_AUTO = 6
|
|
|
|
|
|
|
|
|
|
static MATCHING_ALGORITHMS = [
|
|
|
|
|
{id: MatchingModel.MATCH_ANY, name: "Any"},
|
|
|
|
|
{id: MatchingModel.MATCH_ALL, name: "All"},
|
|
|
|
|
{id: MatchingModel.MATCH_LITERAL, name: "Literal"},
|
|
|
|
|
{id: MatchingModel.MATCH_REGEX, name: "Regular Expression"},
|
|
|
|
|
{id: MatchingModel.MATCH_FUZZY, name: "Fuzzy Match"},
|
|
|
|
|
{id: MatchingModel.MATCH_AUTO, name: "Auto"},
|
|
|
|
|
]
|
|
|
|
|
|
2020-10-27 01:10:18 +01:00
|
|
|
name?: string
|
|
|
|
|
|
|
|
|
|
slug?: string
|
2020-10-28 18:04:50 +01:00
|
|
|
|
|
|
|
|
match?: string
|
|
|
|
|
|
|
|
|
|
matching_algorithm?: number
|
|
|
|
|
|
|
|
|
|
is_insensitive?: boolean
|
2020-10-27 01:10:18 +01:00
|
|
|
|
|
|
|
|
}
|