mirror of https://github.com/iptv-org/iptv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
327 B
TypeScript
19 lines
327 B
TypeScript
import type { CategoryData, CategorySerializedData } from '../types/category'
|
|
|
|
export class Category {
|
|
id: string
|
|
name: string
|
|
|
|
constructor(data: CategoryData) {
|
|
this.id = data.id
|
|
this.name = data.name
|
|
}
|
|
|
|
serialize(): CategorySerializedData {
|
|
return {
|
|
id: this.id,
|
|
name: this.name
|
|
}
|
|
}
|
|
}
|