parent
081d496de9
commit
f98037c7bb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,33 @@
|
||||
from minibase.app import db
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
# End of the line model for CORE.
|
||||
class item(db.Model):
|
||||
__tablename__ = 'item'
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
created = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
|
||||
updated = db.Column(db.DateTime, nullable=False, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
|
||||
# Foreign Keys
|
||||
user_creator_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
|
||||
user_update_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
|
||||
|
||||
category_id = db.Column(db.Integer, db.ForeignKey('itemCategory.id'), nullable=False)
|
||||
# item_id = db.Column(db.Integer, db.ForeignKey('item.id'), nullable=False) #DefinedByUser
|
||||
|
||||
|
||||
class itemCategory(db.Model):
|
||||
__tablename__ = 'itemCategory'
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
|
||||
name = db.Column(db.String(50), nullable=False, unique=True)
|
||||
level = db.Column(db.Integer, nullable=False, unique=True)
|
||||
description = db.Column(db.String(250), nullable=True, unique=True)
|
||||
created = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
|
||||
updated = db.Column(db.DateTime, nullable=False, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
|
||||
# Foreign Keys
|
||||
user_creator_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
|
||||
user_update_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
|
||||
user_responsible_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import SubmitField, TextAreaField
|
||||
from wtforms.validators import DataRequired, Length
|
||||
|
||||
|
||||
class NoteForm(FlaskForm):
|
||||
content = TextAreaField('Content', validators=[DataRequired(), Length(min=1, max=5000)])
|
||||
submit = SubmitField('Add Note')
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,28 @@
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="card shadow-0 border" style="background-color: {{ theme.light_blue }};">
|
||||
<div class="card-body p-4">
|
||||
<div data-mdb-input-init class="form-outline mb-4">
|
||||
<input type="text" id="addANote" class="form-control" placeholder="Type comment..." />
|
||||
<label class="form-label" for="addANote">+ Add a note</label>
|
||||
</div>
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<p>Type your note, and hit enter to add it</p>
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex flex-row align-items-center">
|
||||
<img src="https://mdbcdn.b-cdn.net/img/Photos/Avatars/img%20(4).webp" alt="avatar" width="25"
|
||||
height="25" />
|
||||
<p class="small mb-0 ms-2">Martha</p>
|
||||
</div>
|
||||
<div class="d-flex flex-row align-items-center">
|
||||
<p class="small text-muted mb-0">Upvote?</p>
|
||||
<i class="far fa-thumbs-up mx-2 fa-xs text-body" style="margin-top: -0.16rem;"></i>
|
||||
<p class="small text-muted mb-0">3</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue