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)