CREATE TABLE public.count_events_configuration (
	id serial NOT NULL,
	"object" varchar(255) NOT NULL,
	status varchar(3) NOT NULL,
	"configuration" jsonb NOT NULL DEFAULT '{}'::json
);

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
	 ('XCCFGBE','count_billable_get_config','SCNTBIL','getBillableEventConfig','','count/config','count','Permission to get billable event configuration.','EXE','',1,false,false,NULL);

INSERT INTO public.core_user_roles (id,role_name,hidden) VALUES
	 (25,'BillingAdmin',0);

----------------------------------------------------------------------------------------------------------------------------------------------------------------

INSERT INTO public.core_user_role_has_permission (role_id,permission_code) VALUES
    (25,'MCOUNT'),
    (25,'SCNTMSC'),
    (25,'XCNTCRE'),
    (25,'PCNTEVN'),
    (25,'SCNTEVW'),
    (25,'BCNTSTG'),
    (25,'XCNTGET'),
    (25,'PCNTCNF'),
    (25,'PCNTBIL'),
    (25,'SCNTBIL'),
    (25,'XCNTBGT'),
    (25,'BCNTENB'),
    (25,'BCNTDIS'),
    (25,'BCNTCNF'),
    (25,'XTGGBIL'),
    (25,'XCCFGBE');
----------------------------------------------------------------------------------------------------------------------------------------------------------------

INSERT INTO public.core_settings (setting_type,setting_name,value,properties,ord) VALUES
	 ('count_settings','count_general_configuration','{"events":{"config":["client_id"]}}','{"section_desc": "Count Module Settings", 
	 "section_icon": "fa-solid fa-calculator", "setting_desc": "General configuration", "setting_icon": "fa-solid fa-sliders", 
	 "section_button": "Change settings", "setting_button": "Edit"}',110);