Buckets:
| from flask_sqlalchemy import SQLAlchemy | |
| from datetime import datetime | |
| db = SQLAlchemy() | |
| class Notebook(db.Model): | |
| id = db.Column(db.Integer, primary_key=True) | |
| name = db.Column(db.String(100), nullable=False) | |
| color = db.Column(db.String(7), default="#7719AA") | |
| created_at = db.Column(db.DateTime, default=datetime.utcnow) | |
| sections = db.relationship('Section', backref='notebook', lazy=True) | |
| class Section(db.Model): | |
| id = db.Column(db.Integer, primary_key=True) | |
| name = db.Column(db.String(100), nullable=False) | |
| notebook_id = db.Column(db.Integer, db.ForeignKey('notebook.id')) | |
| pages = db.relationship('Page', backref='section', lazy=True) | |
| class Page(db.Model): | |
| id = db.Column(db.Integer, primary_key=True) | |
| title = db.Column(db.String(200)) | |
| content = db.Column(db.Text) # HTML | |
| drawing_data = db.Column(db.Text) # JSON coordinates | |
| created_at = db.Column(db.DateTime, default=datetime.utcnow) | |
| updated_at = db.Column(db.DateTime, default=datetime.utcnow) | |
| section_id = db.Column(db.Integer, db.ForeignKey('section.id')) | |
Xet Storage Details
- Size:
- 1.08 kB
- Xet hash:
- 6ff1abebdb39996813a9654e0970191abcc9747f83c111e08dc3e10ce33eeb41
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.