Skip to content

Instantly share code, notes, and snippets.

@seseg-rj
Created June 25, 2014 13:59
Show Gist options
  • Save seseg-rj/ed470509d6bf4cacd5d4 to your computer and use it in GitHub Desktop.
Save seseg-rj/ed470509d6bf4cacd5d4 to your computer and use it in GitHub Desktop.
cautela:
PaperTrail::Version: Serve para guardar as versões das cautelas
id: integer
item_type: string
item_id: integer
event: string
whodunnit: string
object: text
created_at: datetime
CautionType:
id: integer
name: string
created_at: datetime
updated_at: datetime
Sentinel::User
id: integer
name: string
functional_id: string
email: string
password_digest: string
change_password: date
employee_id: integer
created_at: datetime
updated_at: datetime
avatar: string
main_activity: string
cellphone: string
education: text
pro_experience: text
projects: text
nickname: string
Sentinel::Feature
id: integer
name: string
friendly_name: string
description: string
origin_control_id: integer
created_at: datetime
updated_at: datetime
project_id: integer
Sentinel::OriginControl
id: integer
name: string
friendly_name: string
description: text
project_id: integer
created_at: datetime
updated_at: datetime
Sentinel::Project
id: integer
name: string
friendly_name: string
token: string
description: text
link: string
Sentinel::Rule
id: integer
name: string
description: text
created_at: datetime
updated_at: datetime
StaticPage
id: integer
name: string
url: string
iframe: string
created_at: datetime
updated_at: datetime
visible: boolean
image: string
link: string
CautionAttachment
id: integer
caution_id: integer
created_at: datetime
uploaded_at: datetime
file: string
updated_at: datetime
Caution
id: integer
employee_id: integer
name: string
created_at: datetime
updated_at: datetime
date_of_inclusion: date
date_of_exclusion: date
date_of_low: date
attachment: string
description: text
responsible: text
situation: text
title: text
caution_type_id: integer
user_id: integer
inventory_number: string
serial_number: string
Person
id: integer
functional_id: string
photo: string
name: string
birthdate: date
email_address: string
id_number: string
ssn_number: string
contact_phone_number: string
origin_agency_id: integer
origin_job_id: integer
type: string
administrative_unit_department_id: integer
gender_id: integer
nationality: string
naturality_id: integer
father_name: string
mother_name: string
blood_type_id: integer
marital_status_id: integer
dependents_count: integer
address_street: string
address_district: string
address_city_id: integer
home_phone_number: string
mobile_phone_number: string
business_phone_number: string
contact_name: string
contact_parentage_level_id: integer
id_issuing_agency: string
id_attachment: string
ssn_attachment: string
passport_number: string
passport_attachment: string
bank_code: string
bank_branch: string
bank_account_number: string
sip_number: string
vrc_number: string
vrc_zone: string
vrc_section: string
vrc_attachment: string
driver_license_number: string
driver_license_attachment: string
driver_license_categories: string
driver_license_expires_at: date
company_driver_license_number: string
registration_code: string
disabled_at: datetime
department_id: integer
function_id: integer
allocation_id: integer
created_at: datetime
updated_at: datetime
admission_public_servant: date
active: boolean
Employee < Person
:id => :integer,
:functional_id => :string,
:photo => :string,
:name => :string,
:birthdate => :date,
:email_address => :string,
:id_number => :string,
:ssn_number => :string,
:contact_phone_number => :string,
:origin_agency_id => :integer,
:origin_job_id => :integer,
:type => :string,
:administrative_unit_department_id => :integer,
:gender_id => :integer,
:nationality => :string,
:naturality_id => :integer,
:father_name => :string,
:mother_name => :string,
:blood_type_id => :integer,
:marital_status_id => :integer,
:dependents_count => :integer,
:address_street => :string,
:address_district => :string,
:address_city_id => :integer,
:home_phone_number => :string,
:mobile_phone_number => :string,
:business_phone_number => :string,
:contact_name => :string,
:contact_parentage_level_id => :integer,
:id_issuing_agency => :string,
:id_attachment => :string,
:ssn_attachment => :string,
:passport_number => :string,
:passport_attachment => :string,
:bank_code => :string,
:bank_branch => :string,
:bank_account_number => :string,
:sip_number => :string,
:vrc_number => :string,
:vrc_zone => :string,
:vrc_section => :string,
:vrc_attachment => :string,
:driver_license_number => :string,
:driver_license_attachment => :string,
:driver_license_categories => :string,
:driver_license_expires_at => :date,
:company_driver_license_number => :string,
:registration_code => :string,
:disabled_at => :datetime,
:department_id => :integer,
:function_id => :integer,
:allocation_id => :integer,
:created_at => :datetime,
:updated_at => :datetime,
:admission_public_servant => :date,
:active => :boolean
},
[12] class Department < ActiveRecord::Base {
:id => :integer,
:name => :string,
:acronym => :string,
:administrative_unit => :string,
:ancestry => :string,
:created_at => :datetime,
:updated_at => :datetime,
:confidential => :boolean,
:lobby => :boolean
},
[13] class Function < ActiveRecord::Base {
:id => :integer,
:name => :string,
:advisor => :boolean,
:ancestry => :string,
:department_id => :integer,
:created_at => :datetime,
:updated_at => :datetime
}
]
(END)
:vrc_section => :string,
:vrc_attachment => :string,
:driver_license_number => :string,
:driver_license_attachment => :string,
:driver_license_categories => :string,
:driver_license_expires_at => :date,
:company_driver_license_number => :string,
:registration_code => :string,
:disabled_at => :datetime,
:department_id => :integer,
:function_id => :integer,
:allocation_id => :integer,
:created_at => :datetime,
:updated_at => :datetime,
:admission_public_servant => :date,
:active => :boolean
},
[12] class Department < ActiveRecord::Base {
:id => :integer,
:name => :string,
:acronym => :string,
:administrative_unit => :string,
:ancestry => :string,
:created_at => :datetime,
:updated_at => :datetime,
:confidential => :boolean,
:lobby => :boolean
},
[13] class Function < ActiveRecord::Base {
:id => :integer,
:name => :string,
:advisor => :boolean,
:ancestry => :string,
:department_id => :integer,
:created_at => :datetime,
:updated_at => :datetime
}
@vinirodr
Copy link

Versions - Serve para guardar as versões das cautelas
_id: integer
item_type: varchar
item_id: integer
event: varchar
whodunnit: varchar
object: text
*_created_at: datetime

CautionTypes
_id: integer
name: varchar
*_created_at: datetime
**updated_at: datetime

CautionAttachments
_id: integer
caution_id: integer
*_created_at: datetime
uploaded_at: datetime
file: varchar
**updated_at: datetime

Cautions
_id: integer
employee_id: integer
name: varchar
*_created_at: datetime
**updated_at: datetime
date_of_inclusion: date
date_of_exclusion: date
date_of_low: date
attachment: varchar
description: text
responsible: text
situation: text
title: text
caution_type_id: integer
user_id: integer
inventory_number: varchar
serial_number: varchar

Obs.:

  • - campo automaticamente incrementado, utilizado como identificador da tabela.
    ** - campo preenchido automaticamente com o valor de timestamp sem timezone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment