
CREATE TABLE nxmat (
    nxmatid integer,
    nxquality text,
    nxthickness double precision,
    nxdensity double precision,
    nxprice double precision,
    nxtimestamp integer,
    nxmatgroup text
);
CREATE TABLE nxpath (
    nxpathid integer,
    nxname text,
    nxmachineid integer,
    nxcutlength double precision,
    nxpowderlength double precision,
    nxrapidlength double precision,
    nxusedarea double precision,
    nxmarkcount integer,
    nxprofcount integer,
    nxcutdate timestamp without time zone,
    nxtimestamp integer,
    nxworknmb text,
    nxstatus text,
    nxpauseid integer,
    nxstarttime timestamp without time zone,
    nxendtime timestamp without time zone,
    nxfull double precision,
    nxcomplited timestamp without time zone,
    nxused double precision,
    nxmainlength double precision,
    nxmainheight double precision,
    nxtotalworktime integer,
    nxtotalpausetime integer,
    nxworkplace text,
    nxphasedate timestamp without time zone,
    nxphasetime timestamp without time zone,
    nxcalcworktime timestamp without time zone,
    nxduedate2 timestamp without time zone,
    nxpictfile text,
    nxmachtime double precision
);

CREATE TABLE nxsheet (
    nxsheetid integer,
    nxmatid integer,
    nxplateid integer,
    nxsmeltnmb text,
    nxused double precision,
    nxlength double precision,
    nxwidth double precision,
    nxweight double precision,
    nxarea double precision,
    nxname text,
    nxcount integer,
    nxtimestamp integer,
    nxfreearea double precision,
    nxfull integer,
    nxblobid integer,
    nxgifname text,
    nxfreerectarea double precision,
    nxfreerectwidth double precision,
    nxfreerectlength double precision,
    nxmaxrectx double precision,
    nxmaxrecty double precision,
    nxstressedarea double precision,
    nxstressedwidth double precision,
    nxstressedlength double precision,
    nxfreeweight double precision,
    nxisremnant integer,
    nxinvmetafile text,
    nxinvnestpct double precision,
    nxinvischanged integer,
    nxcreated timestamp without time zone,
    nxchanged timestamp without time zone
);

CREATE TABLE nxsheetpath (
    nxsheetpathid integer,
    nxpathid integer,
    nxsheetid integer,
    nxcutlength double precision,
    nxpowderlength double precision,
    nxrapidlength double precision,
    nxusedarea double precision,
    nxused double precision,
    nxusedweight double precision,
    nxmarkcount integer,
    nxprofcount integer,
    nxtotaltime double precision,
    nxready integer,
    nxcutdate timestamp without time zone,
    nxtimestamp integer
);
CREATE TABLE nxsheetpathdet (
    nxsheetpathdetid integer,
    nxsheetpathid integer,
    nxorderposid integer,
    nxpartid integer,
    nxdetailcount integer,
    nxdetailcode text,
    nxscratch integer,
    nxusedtime double precision,
    nxusedarea double precision,
    nxweight double precision,
    nxarea double precision,
    nxusedweight double precision,
    nxcomplited timestamp without time zone,
    nxdelivdate timestamp without time zone,
    nxtimestamp integer,
    nxcutted integer,
    nxrejected integer,
    nxrejectedreasonid integer,
    nxpausetime double precision,
    nxspdmachtime double precision,
    nxspdusedtime double precision
);
