payments


Columns

Column Type Size Nulls Auto Default Children Parents Comments
ID int8 19 null

Payment ID

ownergroup int4 10 null
groups.ID fk_payments_ownergroup C

Owner group ID (null=PUBLIC)

creator int4 10 null
users.ID fk_payments_creator N

Creator user ID (defaults to authenticated user on creation)

assigneduser int4 10 null
users.ID fk_payments_assigneduser N

Assigned user ID

creationdate int8 19 date_part('epoch'::text, now())

Creation date and time as a Unix time stamp (defaults to current date and time on creation)

lastmodified int8 19 date_part('epoch'::text, now())

Last modification date and time as a Unix time stamp (auto-reset on modification)

ledger int4 10 null
ledgers.ID fk_payments_ledger N

Ledger ID

transaction int4 10 null
transactions.ID fk_payments_transaction N

Transaction ID; is mutually exclusive to account

account int4 10 null
accounts.ID fk_payments_account N

Account ID; is mutually exclusive to transaction

date int8 19 date_part('epoch'::text, now())

Designated date and time as a Unix time stamp (defaults to current date and time on creation)

subject text 2147483647 ''::text

Subject (e.g. bank statement or reference number)

status int2 5 0

Status (0=DRAFT, 1=COMPLETED, 2=CANCELLED, 3=BOOKED)

amount float8 17,17 null

Amount (monetary); must not be zero

autoadvance int2 5 0

Auto-advance to next transaction

description text 2147483647 ''::text

Detailed general description

Table contained 0 rows

Indexes

Constraint Name Type Sort Column(s)
pk_payments Primary key Asc ID
fk_payments_account Performance Asc account
fk_payments_ledger Performance Asc ledger
fk_payments_transaction Performance Asc transaction
i_payments_date_ID Performance Desc/Desc date + ID
i_payments_noowner Performance Asc ownergroup
i_payments_owner Performance Asc/Asc ownergroup + assigneduser
s_payments Performance Asc subject

Relationships