Table core.salespersons
Details on sales person and other information associated with it.
# Column Name Nullable Data Type Max Length Description
1salesperson_idinteger0The primay key of the table.
2sales_team_idinteger0The id given to the sales person.
3salesperson_codecharacter varying12The code given to the sales person.
4salesperson_namecharacter varying100The name of the sales person, which is also a unique field.
5addresscharacter varying100The address of the sales person.
6contact_numbercharacter varying50The contact number of the sales person.
7commission_ratedecimal_strict20The rate of comission assigned to the sales person.
8account_idbigint0Foreign key to the table core.accounts.
9audit_user_idinteger0Contains the id of the user who last inserted or updated the corresponding row.
10audit_tstimestamp with time zone0Contains the date and timestamp of the last insert or update action.

Foreign Keys

# Column Name Key Name References
2 sales_team_id salespersons_sales_team_id_fkey core.sales_teams.sales_team_id
8 account_id salespersons_account_id_fkey core.accounts.account_id
9 audit_user_id salespersons_audit_user_id_fkey office.users.user_id

Indices

Index Name Owner Access Method Definition Description
salespersons_pkey postgres btree salesperson_id
salespersons_salesperson_name_uix postgres btree upper(salesperson_name::text)

Check Constraints

Constraint Name Description

Default Values

# Column Name Default
1 salesperson_id nextval('core.salespersons_salesperson_id_seq'::regclass)
7 commission_rate 0
10 audit_ts now()

Triggers

Trigger Name Targets On Event Timing Condition Order Orientation Description