This is my Workes TABLE
CREATE TABLE public.persons_persons
(
id integer NOT NULL DEFAULT nextval('persons_persons_id_seq'::regclass),
created timestamp with time zone NOT NULL,
modified timestamp with time zone NOT NULL,
"number" integer NOT NULL,
full_name character varying(400) NOT NULL,
gender character varying(20) NOT NULL,
phone character varying(100) NOT NULL,
agreement_id integer NOT NULL,
sector_id integer NOT NULL,
admission_date date NOT NULL,
cuil character varying(11),
turn_off date,
ignored_checktime boolean NOT NULL,
company_id integer,
blood_type character varying(7) NOT NULL,
civil_state character varying(10) NOT NULL,
confidential_file boolean NOT NULL,
date_of_birth date,
external boolean NOT NULL,
cost_center_id integer NOT NULL,
function_id integer NOT NULL,
author_id integer,
editor_id integer,
agreement_category_id integer NOT NULL,
CONSTRAINT persons_persons_pkey PRIMARY KEY (id),
CONSTRAINT persons_persons_agreement_category_i_38a73002_fk_agreement FOREIGN KEY
(agreement_category_id)
REFERENCES public.agreements_category (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT persons_persons_agreement_id_84b14273_fk_agreement FOREIGN KEY (agreement_id)
REFERENCES public.agreements_agreements (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT persons_persons_author_id_671f6812_fk_users_user_id FOREIGN KEY (author_id)
REFERENCES public.users_user (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT persons_persons_company_id_2524264e_fk_companies_company_id FOREIGN KEY (
company_id)
);
This is my chek time workes
CREATE TABLE public.liquidations_checktime
(
id integer NOT NULL DEFAULT nextval('liquidation_checktime_id_seq'::regclass),
date_hour timestamp with time zone NOT NULL,
type character varying(20) NOT NULL,
day date NOT NULL,
"timestamp" timestamp with time zone NOT NULL,
real_date_hour timestamp with time zone NOT NULL,
indicted boolean NOT NULL,
liquidation integer NOT NULL,
status character varying(20) NOT NULL,
origin_id integer NOT NULL,
person_id integer NOT NULL,
CONSTRAINT liquidation_checktime_pkey PRIMARY KEY (id),
CONSTRAINT liquidation_checktim_origin_id_2a88117b_fk_liquidati FOREIGN KEY (origin_id)
REFERENCES public.liquidations_dataorigin (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT liquidation_checktime_person_id_8f08ddd8_fk_persons_persons_id FOREIGN KEY
(person_id)
REFERENCES public.persons_persons (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
)
The day attribute in the table liquidations_checktime is the one that controls the day the person signed their attendance