INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('PDUNEWS','duty_news','MDUTY','getObjects','','duty/news','duty','Permission to news page','PAG','fa-regular fa-newspaper',1,false,false,NULL);

INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XDTNWGT','duty_news_get','PDUNEWS','getDutyNews','','count/invoices','count','Permission to retrieve news','EXE','',1,false,false,NULL);
     
INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XDTNWAD','duty_news_add','PDUNEWS','addDutyNews','','count/invoices','count','Permission to add news','EXE','',1,false,false,NULL);

INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XDTNWUP','duty_news_upd','PDUNEWS','updDutyNews','','count/invoices','count','Permission to update news','EXE','',1,false,false,NULL);
     
INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XDTNWDL','duty_news_del','PDUNEWS','delDutyNews','','count/invoices','count','Permission to delete news','EXE','',1,false,false,NULL);

CREATE TABLE public.duty_news (
 id serial NOT NULL,
 "date" date not null,
 title varchar(50) NOT NULL,
 "text" varchar not NULL
);
CREATE UNIQUE INDEX duty_news_id_idx ON public.duty_news (id);

INSERT INTO public.core_permissions
(code, permission_name, parent, permission_function, default_child, permission_namespace, "module", permission_description, permission_type, icon, ord, hidden, guest, meta)
VALUES('XDNWGET', 'duty_news_get', 'SDNWSVW', 'getDutyNews', '', 'duty/news', 'duty', 'Permission to get duty news', 'EXE', '', 1, false, false, NULL);


