Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
projeto-integrador-crud-fazenda
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2024105070039
projeto-integrador-crud-fazenda
Commits
3339b4a0
Commit
3339b4a0
authored
Apr 16, 2026
by
Guilherme da Silva Rolim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modelagem.
parent
30ebceda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
model.py
templates/model.py
+10
-6
No files found.
templates/model.py
View file @
3339b4a0
...
@@ -3,8 +3,12 @@ from flask_sqlalchemy import SQLAlchemy
...
@@ -3,8 +3,12 @@ from flask_sqlalchemy import SQLAlchemy
db
=
SQLAlchemy
()
db
=
SQLAlchemy
()
class
Animal
(
db
.
Model
):
class
Animal
(
db
.
Model
):
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
__tablename__
=
'animais'
nome
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
especie
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
)
nome
=
db
.
Column
(
db
.
String
(
100
),
nullable
=
False
)
idade
=
db
.
Column
(
db
.
Integer
)
especie
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
)
peso
=
db
.
Column
(
db
.
Float
)
idade
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
)
\ No newline at end of file
peso
=
db
.
Column
(
db
.
Float
,
nullable
=
False
)
def
__repr__
(
self
):
return
f
'<Animal {self.nome}>'
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment