Files
iptv/scripts/models/category.ts

19 lines
327 B
TypeScript
Raw Normal View History

2025-04-16 20:54:55 +03:00
import type { CategoryData, CategorySerializedData } from '../types/category'
2023-09-15 18:40:35 +03:00
export class Category {
id: string
name: string
2025-03-29 11:39:46 +03:00
constructor(data: CategoryData) {
this.id = data.id
this.name = data.name
2023-09-15 18:40:35 +03:00
}
2025-04-16 20:54:55 +03:00
serialize(): CategorySerializedData {
return {
id: this.id,
name: this.name
}
}
2023-09-15 18:40:35 +03:00
}