mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-30 07:34:10 -05:00
* formatting * snake case all recipes entries * set foreign key to int * run scheduler at startup and not import * set SQLite file path before imports Co-authored-by: hay-kot <hay-kot@pm.me>
15 lines
416 B
Python
15 lines
416 B
Python
import sqlalchemy as sa
|
|
from mealie.db.models.model_base import SqlAlchemyBase
|
|
|
|
|
|
class Note(SqlAlchemyBase):
|
|
__tablename__ = "notes"
|
|
id = sa.Column(sa.Integer, primary_key=True)
|
|
parent_id = sa.Column(sa.Integer, sa.ForeignKey("recipes.id"))
|
|
title = sa.Column(sa.String)
|
|
text = sa.Column(sa.String)
|
|
|
|
def __init__(self, title, text) -> None:
|
|
self.title = title
|
|
self.text = text
|