Skip to content

Instantly share code, notes, and snippets.

@jwage
Created January 6, 2011 21:52
Show Gist options
  • Save jwage/768664 to your computer and use it in GitHub Desktop.
Save jwage/768664 to your computer and use it in GitHub Desktop.
Employee:
columns:
id:
type: integer
primary: true
autoincrement: true
sf_guard_user_id:
type: integer
start_date:
type: date
position_id:
type: integer
relations:
User:
class: sfGuardUser
foreignType: one
foreignAlias: Employee
Specialties:
class: EmployeeSpecialty
refClass: EmployeeSpecialtyRef
local: employee_id
foreign: employee_specialty_id
foreignAlias: Employees
Ranks:
class: EmployeeRank
refClass: EmployeeRankRef
local: employee_id
foreign: employee_rank_id
foreignAlias: Ranks
EmployeeDepartments:
class: Department
refClass: EmployeeDepartmentRef
class: EmployeeDepartment
autoComplete: false
EmployeeDepartment:
columns:
id:
type: integer
primary: true
autoincrement: true
employee_id:
type: integer
department_id:
type: integer
is_manager:
type: boolean
default: false
relations:
Employee:
class: Employee
onDelete: CASCADE
foreignAlias: EmployeeDepartments
Department:
onDelete: CASCADE
foreignAlias: EmployeeDepartments
EmployeeDepartmentRef:
columns:
employee_id:
type: integer
primary: true
employee_department_id:
type: integer
primary: true
relations:
Employee:
class: Employee
onDelete: CASCADE
foreignAlias: EmployeeDepartmentRefs
EmployeeDepartment:
class: EmployeeDepartment
onDelete: CASCADE
foreignAlias: EmployeeDepartmentRefs
Department:
columns:
id:
type: integer
primary: true
autoincrement: true
title:
type: string(155)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment