import { IEntity } from "./IEntity";
import { IQuery } from "./IQuery";

export class Category implements IEntity {
    title: string;
    icon?: string;
    id?: number;

    constructor(title: string, icon?: string, id?: number) {
        this.title = title;
        this.icon = icon;
        this.id = id;
    }

}

export const CategoryQuery: IQuery = {
    tableName: "categories",
    tableQuery: `CREATE TABLE IF NOT EXISTS categories (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        title TEXT NOT NULL,
        icon TEXT
    );`
};