From c1fe215bf58fd7f4ecb9b917f2dd5efd47fee4db Mon Sep 17 00:00:00 2001 From: VictorAmaralC Date: Wed, 29 Nov 2023 19:34:53 -0300 Subject: [PATCH] fix: renaming fields --- gestao/db/models/user.py | 57 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/gestao/db/models/user.py b/gestao/db/models/user.py index 65559e5..7c4964f 100644 --- a/gestao/db/models/user.py +++ b/gestao/db/models/user.py @@ -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)