Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int4 | 10 | √ | null |
|
|
|||||
| register_id | int4 | 10 | √ | null |
|
|
|||||
| booking_id | int4 | 10 | √ | null |
|
|
|||||
| request_id | int4 | 10 | √ | null |
|
|
|||||
| charge_date | date | 13 | null |
|
|
||||||
| charge_type | text | 2147483647 | null |
|
|
||||||
| charge_dept | int4 | 10 | √ | null |
|
|
|||||
| charge_qty | int4 | 10 | √ | null |
|
|
|||||
| charge_amount | t_money | 15,2 | √ | null |
|
|
|||||
| total_amount | t_money | 15,2 | √ | ((charge_qty)::numeric * (charge_amount)::numeric) |
|
|
|||||
| charge_to_booking | bool | 1 | false |
|
|
||||||
| posted | bool | 1 | false |
|
|
||||||
| tran_id | int4 | 10 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_charge_schedule | Primary key | Asc | id |
| idx_charge_schedule_booking_id | Performance | Asc | booking_id |
| idx_charge_schedule_booking_request_chargedate | Performance | Asc/Asc/Asc | booking_id + request_id + charge_date |
| idx_charge_schedule_charge_dept | Performance | Asc | charge_dept |
| idx_charge_schedule_register_id | Performance | Asc | register_id |
| idx_charge_schedule_register_request_chargedate | Performance | Asc/Asc/Asc | register_id + request_id + charge_date |
| idx_charge_schedule_tran_id | Performance | Asc | tran_id |
| unq_charge_schedule | Must be unique | Asc/Asc | request_id + charge_date |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| charge_schedule_charge_type_check | (charge_type = ANY (ARRAY['room'::text, 'inclusion'::text, 'requirement'::text])) |

