Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CRUD_Animais_da_Fazenda2
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
0
Merge Requests
0
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
Hiago Rafael
CRUD_Animais_da_Fazenda2
Commits
b4f020d5
Commit
b4f020d5
authored
May 07, 2026
by
bricioso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
models.py
parent
55530207
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
models.py
models.py
+11
-7
No files found.
models.py
View file @
b4f020d5
class
Animal
:
from
flask_sqlalchemy
import
SQLAlchemy
def
__init__
(
self
,
nome
,
especie
,
idade
,
peso
):
self
.
nome
=
nome
db
=
SQLAlchemy
()
self
.
especie
=
especie
self
.
idade
=
idade
class
Animal
(
db
.
Model
):
self
.
peso
=
peso
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
\ No newline at end of file
nome
=
db
.
Column
(
db
.
String
(
100
),
nullable
=
False
)
especie
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
)
idade
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
)
peso
=
db
.
Column
(
db
.
Float
,
nullable
=
False
)
\ 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