JP
Jhojan Pier

Registration Form - Copy this React, Tailwind Component to your project

-- Base de datos: rrhh -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla address -- CREATE TABLE address ( id bigint(20) NOT NULL, eliminado tinyint(4) NOT NULL DEFAULT 0, localidad_ciudad varchar(25) NOT NULL, barrio_zona varchar(25) NOT NULL, numero varchar(255) NOT NULL, estado tinyint(4) NOT NULL DEFAULT 1, calle varchar(25) NOT NULL, employee_id bigint(20) DEFAULT NULL, province_id bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla area -- CREATE TABLE area ( id bigint(20) NOT NULL, area varchar(25) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla contract -- CREATE TABLE contract ( id bigint(20) NOT NULL, descripcion_contrato varchar(100) DEFAULT NULL, tipo_contrato varchar(25) NOT NULL, eliminado tinyint(4) NOT NULL DEFAULT 0, fecha_fin date NOT NULL, salario bigint(20) NOT NULL, fecha_inicio date NOT NULL, estado tinyint(4) NOT NULL DEFAULT 1, employee_id bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla department -- CREATE TABLE department ( id bigint(20) NOT NULL, eliminado tinyint(4) NOT NULL DEFAULT 0, departamento varchar(25) NOT NULL, estado tinyint(4) NOT NULL DEFAULT 1 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Volcado de datos para la tabla department -- INSERT INTO department (id, eliminado, departamento, estado) VALUES (1, 0, 'Beni', 1), (2, 0, 'Chuquisaca', 1), (3, 0, 'Cochabamba', 1), (4, 0, 'La Paz', 1), (5, 0, 'Oruro', 1), (6, 0, 'Pando', 1), (7, 0, 'Potosí', 1), (8, 0, 'Santa Cruz', 1), (9, 0, 'Tarija', 1); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla employee -- CREATE TABLE employee ( id bigint(20) NOT NULL, fecha_nacimiento date NOT NULL, ci varchar(20) NOT NULL, eliminado tinyint(4) NOT NULL DEFAULT 0, apellido_materno varchar(25) DEFAULT NULL, apellido_paterno varchar(25) DEFAULT NULL, estado_civil varchar(25) DEFAULT NULL, nombre varchar(25) NOT NULL, ocupacion varchar(25) DEFAULT NULL, celular varchar(8) DEFAULT NULL, estado tinyint(4) NOT NULL DEFAULT 1 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla job_position -- CREATE TABLE job_position ( id bigint(20) NOT NULL, fecha_asignacion date NOT NULL, eliminado tinyint(4) NOT NULL DEFAULT 0, nombre_puesto varchar(25) NOT NULL, estado tinyint(4) NOT NULL DEFAULT 1, area_id bigint(20) DEFAULT NULL, employee_id bigint(20) DEFAULT NULL, supervisor_id bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla province -- CREATE TABLE province ( id bigint(20) NOT NULL, eliminado tinyint(4) NOT NULL DEFAULT 0, provincia varchar(25) NOT NULL, estado tinyint(4) NOT NULL DEFAULT 1, department_id bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Índices para tablas volcadas -- -- -- Indices de la tabla address -- ALTER TABLE address ADD PRIMARY KEY (id), ADD UNIQUE KEY UKpnjv1libu2pe8bpd4aeq55242 (employee_id), ADD KEY FKf8x0jfwoo94op8u88og1ohdcn (province_id); -- -- Indices de la tabla area -- ALTER TABLE area ADD PRIMARY KEY (id), ADD UNIQUE KEY UKlbikbl66y17sxo392bnhalqiu (area); -- -- Indices de la tabla contract -- ALTER TABLE contract ADD PRIMARY KEY (id), ADD KEY FKr2iw6grixlkbx43q2svdrhbb9 (employee_id); -- -- Indices de la tabla department -- ALTER TABLE department ADD PRIMARY KEY (id), ADD UNIQUE KEY UKbia18omh4qcwuqru7qc0jvulw (departamento); -- -- Indices de la tabla employee -- ALTER TABLE employee ADD PRIMARY KEY (id), ADD UNIQUE KEY UK313dc1qb7bpm9im0sx4qfdu0k (ci); -- -- Indices de la tabla job_position -- ALTER TABLE job_position ADD PRIMARY KEY (id), ADD KEY FKa2r1p260u7x8m4pjanpcm0hlw (area_id), ADD KEY FK40nb1afph043dbvn5osdfqfbh (employee_id), ADD KEY FK5sae04m5qgjtvqe7ofgxh2b16 (supervisor_id); -- -- Indices de la tabla province -- ALTER TABLE province ADD PRIMARY KEY (id), ADD UNIQUE KEY UKbbf5a0u0x2cxj64hl1cv6m3j5 (provincia), ADD KEY FKlqwtri7foyv73f09apfupey7v (department_id); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla address -- ALTER TABLE address MODIFY id bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla area -- ALTER TABLE area MODIFY id bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla contract -- ALTER TABLE contract MODIFY id bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla department -- ALTER TABLE department MODIFY id bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT de la tabla employee -- ALTER TABLE employee MODIFY id bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla job_position -- ALTER TABLE job_position MODIFY id bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla province -- ALTER TABLE province MODIFY id bigint(20) NOT NULL AUTO_INCREMENT; -- -- Restricciones para tablas volcadas -- -- -- Filtros para la tabla address -- ALTER TABLE address ADD CONSTRAINT FKf8x0jfwoo94op8u88og1ohdcn FOREIGN KEY (province_id) REFERENCES province (id), ADD CONSTRAINT FKq4m60pqp7shng4u5n9h2346mp FOREIGN KEY (employee_id) REFERENCES employee (id); -- -- Filtros para la tabla contract -- ALTER TABLE contract ADD CONSTRAINT FKr2iw6grixlkbx43q2svdrhbb9 FOREIGN KEY (employee_id) REFERENCES employee (id); -- -- Filtros para la tabla job_position -- ALTER TABLE job_position ADD CONSTRAINT FK40nb1afph043dbvn5osdfqfbh FOREIGN KEY (employee_id) REFERENCES employee (id), ADD CONSTRAINT FK5sae04m5qgjtvqe7ofgxh2b16 FOREIGN KEY (supervisor_id) REFERENCES employee (id), ADD CONSTRAINT FKa2r1p260u7x8m4pjanpcm0hlw FOREIGN KEY (area_id) REFERENCES area (id); -- -- Filtros para la tabla province -- ALTER TABLE province ADD CONSTRAINT FKlqwtri7foyv73f09apfupey7v FOREIGN KEY (department_id) REFERENCES department (id); COMMIT; tengo esta base de datos, me gusta lo que me presentaste pero quiero que lo hagas sobre esa base de datos que te presente

Prompt
Component Preview

About

RegistrationForm - A user-friendly HR registration form with validation, responsive design, and customizable fields, built with React. Get code instantly!

Share

Last updated 1 month ago