CREATE TABLE cat_archivopem
(
  idu_pem integer NOT NULL,
  clv_rfcempresa character varying(13) NOT NULL,
  arc_cer character varying(64) NOT NULL,
  arc_key character varying(64) NOT NULL,
  cve_llavepublica text NOT NULL,
  cve_llaveprivada text NOT NULL,
  cve_password character varying(256) NOT NULL,
  fec_vigenciainicio timestamp without time zone NOT NULL,
  fec_vigenciafin timestamp without time zone NOT NULL,
  fec_registro timestamp without time zone NOT NULL,
  opc_estatus smallint NOT NULL,
  CONSTRAINT pk_cat_archivopem_idu_pem PRIMARY KEY (idu_pem ),
  CONSTRAINT fk_cat_archivopem_clv_rfcempresa FOREIGN KEY (clv_rfcempresa)
      REFERENCES cat_empresasnomina (clv_rfc) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT uq_cat_archivopem_clv_rfcempresa UNIQUE (clv_rfcempresa ),
  CONSTRAINT chk_cat_archivopem_llavevalida CHECK (btrim(cve_llavepublica) <> ''::text AND btrim(cve_llaveprivada) <> ''::text)
);
ALTER TABLE cat_archivopem
  OWNER TO sysfacturaelectronicaadmin;
