41 lines
1.8 KiB
SQL
41 lines
1.8 KiB
SQL
insert into account_t (description) values ('fee testtenant1');
|
|
insert into account_t (description) values ('overhead testtenant1');
|
|
insert into account_t (description) values ('disposit testtenant1');
|
|
|
|
insert into tenant_t (lastname, fee_account, overhead_account, disposit_account) values (
|
|
'testtenant1',
|
|
(select id from account_t where comment = 'fee testtenant1'),
|
|
(select id from account_t where comment = 'overhead testtenant1'),
|
|
(select id from account_t where comment = 'disposit testtenant1'),
|
|
);
|
|
|
|
insert into premise_t (street, zip, city) values ('Hemsingskotten 38', '45259', 'Essen');
|
|
|
|
insert into parking_t (description, premise) values ('Garage 1', (select id from premise_t where street = 'Hemsingskotten 38'));
|
|
|
|
insert into flat_t (description, premise, area, flat_no) values('EG links', (select id from premise_t where street = 'Hemsingskotten 38'), 59.0, 1);
|
|
|
|
insert into fee_t (comment, amount, fee_type, startdate) values ('Altenwohnung Hemsingskotten', 5.23, 'per_area', '2021-01-01');
|
|
|
|
insert into fee_t (comment, amount, fee_type, startdate) values ('Garage intern', 30.0, 'total', '2021-01-01');
|
|
|
|
insert into tenancy_t (tenant, flat, startdate) values (
|
|
(select id from tenant_t where lastname = 'testtenant1'),
|
|
(select id from flat_t where flat_no = 1),
|
|
'2021-06-01'
|
|
);
|
|
|
|
insert into tenancy_t (tenant, parking, startdate) values (
|
|
(select id from tenant_t where lastname = 'testtenant1'),
|
|
(select id from parking_t where description = 'Garage 1'),
|
|
'2021-06-01'
|
|
);
|
|
|
|
insert into overhead_advance_t (description, amount, startdate) values ('BKV Altenwohnung Hemsingskotten', 0.34, '2021-01-01');
|
|
|
|
insert into overhead_advance_flat_mapping_t (overhead_advance, flat) values (
|
|
(select id from overhead_advance_t where description = 'BKV Altenwohnung Hemsingskotten'),
|
|
(select id from flat_t where flat_no = 1)
|
|
);
|
|
|