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.
iptv/scripts/models/category.ts

19 lines
327 B
TypeScript

3 months ago
import type { CategoryData, CategorySerializedData } from '../types/category'
2 years ago
export class Category {
id: string
name: string
3 months ago
constructor(data: CategoryData) {
this.id = data.id
this.name = data.name
2 years ago
}
3 months ago
serialize(): CategorySerializedData {
return {
id: this.id,
name: this.name
}
}
2 years ago
}