mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-10 17:10:04 -04:00
18 lines
327 B
TypeScript
18 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
|
|
}
|
|
}
|
|
}
|