Files
BeWoPlaner/Model/Changes_2024_07_15 Wohneinheit.txt

47 lines
1.9 KiB
Plaintext

CREATE TABLE IF NOT EXISTS `wohneinheit` (
`Oid` bigint NOT NULL AUTO_INCREMENT,
`InsTs` datetime DEFAULT NULL,
`InsUser` varchar(256) DEFAULT NULL,
`Notice` varchar(1024) DEFAULT NULL,
`Tid` int DEFAULT NULL,
`UdpUser` varchar(256) DEFAULT NULL,
`Version` bigint DEFAULT NULL,
`IsActive` tinyint DEFAULT NULL,
`SystemEntryID` int DEFAULT NULL,
`WohnheimOid` bigint NOT NULL,
`Wohnname` varchar(256) NOT NULL,
`Zimmername` varchar(256) DEFAULT NULL,
`Miete` decimal(18,10) DEFAULT NULL,
`Heizung` decimal(18,10) DEFAULT NULL,
`Strom` decimal(18,10) DEFAULT NULL,
`Betriebskosten` decimal(18,10) DEFAULT NULL,
`SonstigeKosten` decimal(18,10) DEFAULT NULL,
`Kaution` decimal(18,10) DEFAULT NULL,
`QM` decimal(18,10) DEFAULT NULL,
`Baujahr` int DEFAULT NULL,
`Mobilierung` varchar(1024) DEFAULT NULL,
`Zusatznotiz` varchar(1024) DEFAULT NULL,
`Stock` varchar(256) DEFAULT NULL,
PRIMARY KEY (`Oid`),
CONSTRAINT `FK_WOHNEINHEIT_WOHNHEIM` FOREIGN KEY (`WohnheimOid`) REFERENCES `Wohnheim` (`Oid`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `wohneinheitbelegung` (
`Oid` bigint NOT NULL AUTO_INCREMENT,
`InsTs` datetime DEFAULT NULL,
`InsUser` varchar(256) DEFAULT NULL,
`Notice` varchar(1024) DEFAULT NULL,
`Tid` int DEFAULT NULL,
`UdpUser` varchar(256) DEFAULT NULL,
`Version` bigint DEFAULT NULL,
`IsActive` tinyint DEFAULT NULL,
`SystemEntryID` int DEFAULT NULL,
`WohneinheitOid` bigint NOT NULL,
`CustomerOid` bigint NOT NULL,
`StartDate` datetime NOT NULL,
`EndDate` datetime DEFAULT NULL,
`Kommentar` varchar(1024) DEFAULT NULL,
PRIMARY KEY (`Oid`),
CONSTRAINT `FK_WOHNEINHEITBELEGUNG_WOHNEINHEIT` FOREIGN KEY (`WohneinheitOid`) REFERENCES `Wohneinheit` (`Oid`),
CONSTRAINT `FK_WOHNEINHEITBELEGUNG_CUSTOMER` FOREIGN KEY (`CustomerOid`) REFERENCES `Customer` (`Oid`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1