Skip to content

Commit

Permalink
fix: renaming fields
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorAmaralC committed Nov 29, 2023
1 parent 64a3db5 commit c1fe215
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions gestao/db/models/user.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
from datetime import date, datetime
from typing import Optional

import ormar

from gestao.db.base import BaseMeta

import ormar

class User(ormar.Model):
class Meta(BaseMeta):
tablename = "user"

id: str = ormar.String(max_length=200, primary_key=True)
name: str = ormar.String(max_length=200)
fullName: str = ormar.String(max_length=200)
warName: Optional[str] = ormar.String(max_length=200, unique=True, nullable=True)
registration: str = ormar.String(max_length=200, unique=True)
birthDate: date = ormar.Date()
rg: str = ormar.String(max_length=200, unique=True)
cpf: str = ormar.String(max_length=200, unique=True)
placeOfBirth: str = ormar.String(max_length=200)
ufNatural: str = ormar.String(max_length=100)
marital_status: str = ormar.String(max_length=200)
zipcode: str = ormar.String(max_length=100)
address: str = ormar.String(max_length=200)
neighborhood: str = ormar.String(max_length=200)
number: str = ormar.String(max_length=100)
city: str = ormar.String(max_length=100)
state: str = ormar.String(max_length=100)
zipcode: str = ormar.String(max_length=100)
cpf: str = ormar.String(max_length=200, unique=True)
rg: str = ormar.String(max_length=200, unique=True)
birth_date: date = ormar.Date()
place_of_birth: str = ormar.String(max_length=200)
blood_type: str = ormar.String(max_length=200)
gender: str = ormar.String(max_length=200)
father_name: str = ormar.String(max_length=200)
mother_date: str = ormar.String(max_length=200)
position: str = ormar.String(max_length=200)
occupancy: str = ormar.String(max_length=200)
admission_date: date = ormar.Date()
situation: str = ormar.String(max_length=200)
phone: str = ormar.String(max_length=200)
uf: str = ormar.String(max_length=100)
complement: str = ormar.String(max_length=200)
email: str = ormar.String(max_length=200)
marital_status: str = ormar.String(max_length=200)
education: str = ormar.String(max_length=200)
registration: str = ormar.String(max_length=200, unique=True)
cellphone: str = ormar.String(max_length=200)
phone: str = ormar.String(max_length=200)
gender: str = ormar.String(max_length=200)
motherName: str = ormar.String(max_length=200)
fatherName: str = ormar.String(max_length=200)
scolarity: str = ormar.String(max_length=200)
religion: str = ormar.String(max_length=200)
bloodType: str = ormar.String(max_length=200)
function: str = ormar.String(max_length=200)
actualSituation: str = ormar.String(max_length=200)
admissionDate: date = ormar.Date()
role: str = ormar.String(max_length=200)
category: str = ormar.String(max_length=200)
pattern: str = ormar.String(max_length=200)
status: str = ormar.String(max_length=200, default="active")
bodyOfLaw: str = ormar.String(max_length=200)
lotation: str = ormar.String(max_length=200)
workstation: Optional[str] = ormar.String(max_length=200, nullable=True)
nickname: Optional[str] = ormar.String(max_length=200, unique=True, nullable=True)

status: str = ormar.String(max_length=200, default="active")
dispatcher: str = ormar.String(max_length=200)
dispatched_date: date = ormar.Date()
created_at: datetime = ormar.DateTime(timezone=True, default=datetime.now)
Expand Down

0 comments on commit c1fe215

Please sign in to comment.