# Synthetic hr schema (generated by scripts/gen_schema.py)

# Employee documentation
Employee as emp0
---
EmployeeId PK int IDENTITY
Field0Employee datetime
Field1Employee decimal(10,2) default=2
Field2Employee money default=6
Field3Employee bool INDEX
Field4Employee string NULL
Field5Employee uuid NULL

Department
-
DepartmentId PK int IDENTITY
BudgetRef0 int FK -< Budget.BudgetId
Field0Department uuid UNIQUE
Field1Department datetime
Field2Department date UNIQUE
Field3Department bool

Position
-
PositionId PK int IDENTITY
SegmentRef0 int FK >- Segment.SegmentId
Field0Position money
Field1Position datetime
Field2Position datetime default=5
"Display Name" string="Unnamed Position"

JobGrade
rel >- Quota
---
JobGradeId PK int IDENTITY
Field0JobGrade varchar(200)
Field1JobGrade date INDEX
Field2JobGrade text default=7
Field3JobGrade decimal(10,2)
Field4JobGrade date default=1
Field5JobGrade uuid
Field6JobGrade bool default=1
Field7JobGrade string default=0

Salary
---
SalaryId PK int IDENTITY
LoanRef0 int FK >-< loa28.LoanId
PriceListRef1 int FK -0 PriceList.PriceListId
Field0Salary bool INDEX
Field1Salary string
Field2Salary date

# Bonus documentation
"hr.Bonus"
----------
BonusId PK int IDENTITY
Field0Bonus varchar(200) INDEX
Field1Bonus uuid
Field2Bonus text
Field3Bonus datetime INDEX
Field4Bonus datetime
Field5Bonus decimal(10,2)
Field6Bonus int UNIQUE
Field7Bonus string

Benefit
-
BenefitId PK int IDENTITY
QuoteRef0 int FK 0- Quote.QuoteId
Field0Benefit money NULL
Field1Benefit money INDEX
Field2Benefit uuid INDEX
Field3Benefit string NULL
Field4Benefit bool NULL

Enrollment as enr7
----------
EnrollmentId PK int IDENTITY
OpportunityRef0 int FK 0-0 Opportunity.OpportunityId
SerialNumberRef1 int FK -0< SerialNumber.SerialNumberId
Field0Enrollment int UNIQUE
Field1Enrollment uuid INDEX
Field2Enrollment text NULL
Field3Enrollment decimal(10,2) UNIQUE

Leave
---
LeaveId PK int IDENTITY
CostCenterRef0 int FK >0- CostCenter.CostCenterId
Field0Leave int default=6
Field1Leave int NULL

LeaveType
-
LeaveTypeId PK int IDENTITY
Field0LeaveType uuid

# Timesheet documentation
Timesheet
-
TimesheetId PK int IDENTITY
Field0Timesheet money NULL

TimesheetLine
---
TimesheetLineId PK int IDENTITY
Field0TimesheetLine text NULL
Field1TimesheetLine date default=5
Field2TimesheetLine date NULL

Project
----
ProjectId PK int IDENTITY
Field0Project decimal(10,2) UNIQUE
Field1Project datetime default=0
Field2Project date
Field3Project money INDEX
Field4Project int
Field5Project money UNIQUE
Field6Project money NULL
Field7Project datetime NULL
Field8Project text NULL

ProjectRole
---
ProjectRoleId PK int IDENTITY
SalesNoteRef0 int FK - SalesNote.SalesNoteId
Field0ProjectRole int INDEX
Field1ProjectRole money default=8
Field2ProjectRole varchar(200) NULL
Field3ProjectRole datetime UNIQUE
Field4ProjectRole string UNIQUE
Field5ProjectRole string
Field6ProjectRole decimal(10,2) UNIQUE
Field7ProjectRole money default=9

Skill as ski14
rel >- SalesRep
-
SkillId PK int IDENTITY
Field0Skill decimal(10,2) NULL
Field1Skill bool
Field2Skill decimal(10,2)
Field3Skill string NULL
Field4Skill date INDEX
Field5Skill decimal(10,2) UNIQUE
Field6Skill datetime INDEX
Field7Skill text UNIQUE
Field8Skill datetime default=5

# EmployeeSkill documentation
EmployeeSkill
----------
EmployeeSkillId PK int IDENTITY
CartRef0 int FK -< Cart.CartId
Field0EmployeeSkill bool UNIQUE
Field1EmployeeSkill bool
Field2EmployeeSkill date
Field3EmployeeSkill varchar(200) UNIQUE
Field4EmployeeSkill text default=9
Field5EmployeeSkill money NULL
Field6EmployeeSkill decimal(10,2) NULL
Field7EmployeeSkill money NULL

Review
----------
ReviewId PK int IDENTITY
StockMoveRef0 int FK >- StockMove.StockMoveId
AllocationRef1 int FK >-< Allocation.AllocationId
Field0Review uuid NULL
Field1Review bool NULL
Field2Review text NULL
Field3Review text default=0
Field4Review int
Field5Review int INDEX
Field6Review varchar(200)
Field7Review varchar(200) NULL

Goal
----------
GoalId PK int IDENTITY
LeadRef0 int FK -0 Lead.LeadId
Field0Goal uuid
Field1Goal text INDEX
Field2Goal int default=0
Field3Goal datetime UNIQUE
Field4Goal int
Field5Goal money
Field6Goal string NULL
Field7Goal decimal(10,2) default=3

"hr.Training"
----
TrainingId PK int IDENTITY
LoanRef0 int FK 0- loa28.LoanId
Field0Training string INDEX
Field1Training uuid NULL
Field2Training decimal(10,2)
Field3Training string
Field4Training money INDEX
Field5Training text
Field6Training int

Course
----------
CourseId PK int IDENTITY
BinRef0 int FK 0-0 Bin.BinId
Field0Course text NULL
Field1Course decimal(10,2) INDEX
"Display Name" string="Unnamed Course"

# Certification documentation
Certification
----
CertificationId PK int IDENTITY
Field0Certification datetime default=8
Field1Certification int UNIQUE

Candidate as can21
-
CandidateId PK int IDENTITY
Field0Candidate money UNIQUE
Field1Candidate varchar(200) NULL
Field2Candidate date

Application
----
ApplicationId PK int IDENTITY
ResellerRef0 int FK -0< res35.ResellerId
Field0Application text
Field1Application string NULL

Interview
-
InterviewId PK int IDENTITY
MachineRef0 int FK >0- mac21.MachineId
Field0Interview int INDEX
Field1Interview uuid UNIQUE
Field2Interview text INDEX
Field3Interview varchar(200)
Field4Interview money default=1
Field5Interview datetime

Offer
-
OfferId PK int IDENTITY
Field0Offer varchar(200)
Field1Offer varchar(200) UNIQUE
Field2Offer bool
Field3Offer int INDEX
Field4Offer bool

# Contractor documentation
Contractor
rel >- SalesNote
-
ContractorId PK int IDENTITY
Field0Contractor uuid default=8
Field1Contractor text
Field2Contractor int UNIQUE
Field3Contractor text default=1
Field4Contractor date INDEX
Field5Contractor int INDEX
Field6Contractor money

Agency
---
AgencyId PK int IDENTITY
ProjectRoleRef0 int FK - ProjectRole.ProjectRoleId
JournalLineRef1 int FK -< JournalLine.JournalLineId
Field0Agency varchar(200) UNIQUE
Field1Agency datetime INDEX
Field2Agency varchar(200) NULL
Field3Agency money INDEX
Field4Agency datetime
Field5Agency bool NULL
Field6Agency uuid default=9

Location
---
LocationId PK int IDENTITY
PaymentMethodRef0 int FK >- PaymentMethod.PaymentMethodId
Field0Location datetime INDEX
Field1Location bool INDEX
Field2Location bool UNIQUE

Holiday as hol28
----------
HolidayId PK int IDENTITY
PartnerRef0 int FK >-< Partner.PartnerId
GLGroupRef1 int FK -0 GLGroup.GLGroupId
Field0Holiday date INDEX
Field1Holiday bool INDEX
Field2Holiday bool
Field3Holiday uuid NULL
Field4Holiday bool UNIQUE
Field5Holiday money

Payroll
---
PayrollId PK int IDENTITY
CourseRef0 int FK 0- Course.CourseId
TaxRateRef1 int FK 0-0 TaxRate.TaxRateId
Field0Payroll int
Field1Payroll decimal(10,2) UNIQUE
Field2Payroll string
Field3Payroll uuid
Field4Payroll datetime UNIQUE
Field5Payroll varchar(200) INDEX
Field6Payroll string default=7
Field7Payroll uuid INDEX
Field8Payroll text

# PayrollLine documentation
PayrollLine
----------
PayrollLineId PK int IDENTITY
ContractRef0 int FK -0< Contract.ContractId
BatchRef1 int FK >0- Batch.BatchId
Field0PayrollLine date
Field1PayrollLine decimal(10,2) NULL
Field2PayrollLine date default=0
Field3PayrollLine money INDEX
Field4PayrollLine string
Field5PayrollLine datetime default=3
Field6PayrollLine text default=8
Field7PayrollLine date INDEX
Field8PayrollLine bool INDEX

"hr.Deduction"
---
DeductionId PK int IDENTITY
SalesRepRef0 int FK - SalesRep.SalesRepId
Field0Deduction string INDEX
Field1Deduction string
Field2Deduction varchar(200) UNIQUE
Field3Deduction bool NULL
Field4Deduction text UNIQUE
Field5Deduction uuid INDEX
Field6Deduction uuid
Field7Deduction datetime

Pension
-
PensionId PK int IDENTITY
Field0Pension string
Field1Pension decimal(10,2) NULL
Field2Pension text UNIQUE
Field3Pension text INDEX
Field4Pension decimal(10,2)
Field5Pension varchar(200)

Manager
----------
ManagerId PK int IDENTITY
TerritoryRef0 int FK -< ter7.TerritoryId
Field0Manager uuid INDEX
Field1Manager money
Field2Manager decimal(10,2) UNIQUE
Field3Manager string

Team
---
TeamId PK int IDENTITY
WarehouseRef0 int FK >- Warehouse.WarehouseId
Field0Team uuid UNIQUE
Field1Team uuid
Field2Team bool INDEX
Field3Team date default=6

# TeamMember documentation
TeamMember as tea35
-
TeamMemberId PK int IDENTITY
ReceiptRef0 int FK >-< Receipt.ReceiptId
Field0TeamMember date
Field1TeamMember datetime default=9
Field2TeamMember string UNIQUE
Field3TeamMember string UNIQUE
Field4TeamMember string UNIQUE
Field5TeamMember varchar(200) INDEX
Field6TeamMember money NULL
Field7TeamMember date INDEX

Onboarding
rel >- FiscalYear
----------
OnboardingId PK int IDENTITY
GoalRef0 int FK -0 Goal.GoalId
CurrencyRef1 int FK 0- Currency.CurrencyId
Field0Onboarding varchar(200) UNIQUE
Field1Onboarding varchar(200) UNIQUE
Field2Onboarding uuid
Field3Onboarding bool INDEX
Field4Onboarding varchar(200) INDEX
Field5Onboarding text
Field6Onboarding uuid
Field7Onboarding uuid
Field8Onboarding uuid NULL
"Display Name" string="Unnamed Onboarding"

Exit
-
ExitId PK int IDENTITY
TerritoryRef0 int FK 0-0 ter7.TerritoryId
BankAccountRef1 int FK -0< BankAccount.BankAccountId
Field0Exit int NULL
Field1Exit text NULL
Field2Exit uuid
Field3Exit uuid default=8
Field4Exit string

Survey
----
SurveyId PK int IDENTITY
SerialNumberRef0 int FK >0- SerialNumber.SerialNumberId
TrainingRef1 int FK - "hr.Training".TrainingId
Field0Survey uuid NULL

SurveyAnswer
----------
SurveyAnswerId PK int IDENTITY
Field0SurveyAnswer datetime INDEX
Field1SurveyAnswer datetime
Field2SurveyAnswer uuid NULL
Field3SurveyAnswer decimal(10,2)
