Update src/

This commit is contained in:
freearhey 2025-04-14 21:53:33 +03:00
parent 09b07e9b24
commit 86743c74f5
132 changed files with 4418 additions and 1907 deletions

27
src/models/category.ts Normal file
View file

@ -0,0 +1,27 @@
import type { CategoryData, CategorySerializedData } from '~/types/category'
export class Category {
id: string
name: string
constructor(data?: CategoryData) {
if (!data) return
this.id = data.id
this.name = data.name
}
serialize(): CategorySerializedData {
return {
id: this.id,
name: this.name
}
}
deserialize(data: CategorySerializedData): this {
this.id = data.id
this.name = data.name
return this
}
}