ADD filtering and searching 0.9.7

This commit is contained in:
2023-10-29 21:48:49 +01:00
parent 372fdada98
commit 6d03c99a34
26 changed files with 884 additions and 53 deletions

View File

@ -35,6 +35,7 @@ CREATE TABLE `#__depot` (
`datasheet_id` INT(11) NOT NULL DEFAULT 0,
`datasheet_alt` VARCHAR(1024) NOT NULL DEFAULT '',
`manufacturer_id` INT(11) NOT NULL DEFAULT 0,
`package_id` INT(11) NOT NULL DEFAULT 0,
`stock_id` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_state` (`state`),
@ -46,9 +47,9 @@ CREATE TABLE `#__depot` (
DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO `#__depot` (`component_name`,`alias`,`description`,`quantity`,`created`,
`ordering`,`state`,`manufacturer_id`,`stock_id`) VALUES
('1N5404','1n5404','diode, rectifier 3A',9,'2023-09-25 15:00:00',1,1,1,1),
('1N4148','1n4148','diode, general purpose',1234,'2023-09-25 15:15:15',2,1,2,1);
`ordering`,`state`,`manufacturer_id`,`stock_id`,`package_id`) VALUES
('1N5404','1n5404','diode, rectifier 3A',9,'2023-09-25 15:00:00',1,1,1,1,9),
('1N4148','1n4148','diode, general purpose',1234,'2023-09-25 15:15:15',2,1,2,1,8);
DROP TABLE IF EXISTS `#__depot_manufacturer`;
CREATE TABLE `#__depot_manufacturer` (
@ -123,28 +124,53 @@ DROP TABLE IF EXISTS `#__depot_package`;
CREATE TABLE `#__depot_package` (
`id` SERIAL,
`name` VARCHAR(400) NOT NULL DEFAULT '',
`description` VARCHAR(4000) NOT NULL DEFAULT '',
`alias` VARCHAR(400) NOT NULL DEFAULT '',
`image` VARCHAR(1024) NOT NULL DEFAULT '',
`state` TINYINT(4) NOT NULL DEFAULT 0
COMMENT 'Published=1,Unpublished=0,Archived=2,Trashed=-2',
`mounting_style` TINYINT(4) NOT NULL DEFAULT 0
`mounting_style_id` TINYINT(4) NOT NULL DEFAULT 0
COMMENT 'Unknown=0,Through_Hole=1,SMD/SMT=2',
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`checked_out` INT(11) NOT NULL DEFAULT 0,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
AUTO_INCREMENT=0
DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO `#__depot_package` (`name`,`state`,`mounting_style`) VALUES
('R_0603_1608Metric',1,2),
('R_0805_2012Metric',1,2),
('DIL8',1,1),
('DIL14',1,1),
('DIL16',1,1),
('DIL20',1,1),
('DIL28_SMALL',1,1),
('UFQFPN48',1,2),
('R_TH_0207_6xø2.3mm_0.25W',1,1),
('R_TH_0104_3.3xø1.8mm_0.125W',1,1),
('R_TH_0309_9xø3.2mm_0.5W',1,1),
('R_TH_0412_11.5xø4.5mm_1W',1,1),
('R_TH_0516_15.5xø5mm_2W',1,1);
INSERT INTO `#__depot_package` (`name`,`description`,`state`,`mounting_style_id`) VALUES
('R_0603_1608Metric','1.6 x 0.8 mm',1,1),
('R_0805_2012Metric','2.0 x 1.2 mm',1,1),
('DIP8','dual inline package 8 pins',1,2),
('DIP14','dual inline package 14 pins',1,2),
('DIP16','dual inline package 16 pins',1,2),
('DIP20','dual inline package 20 pins',1,2),
('DIP28_SMALL','dual inline package 28 pins, small',1,2),
('DO-35','DO-204-AH, SOD27, 3.05-5.08 x ø1.53-ø2.28 mm diode axial package',1,2),
('DO-201AD','DO-27, 7.2-9.5 x ø4.8-ø5.3 mm diode axial package',1,2),
('QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mm','Ultra thin Fine pitch Quad Flat Package No-leads, 7 x 7 mm, 0.5 mm pitch, 48 pins',1,1),
('R_TH_0207','axial 6xø2.3mm typ. 0.25W',1,2),
('R_TH_0104','axial 3.3xø1.8mm typ 0.125W',1,2),
('R_TH_0309','axial 9xø3.2mm typ. 0.5W',1,2),
('R_TH_0412','axial 11.5xø4.5mm typ. 1W',1,2),
('R_TH_0516','axial 15.5xø5mm typ. 2W',1,2);
DROP TABLE IF EXISTS `#__depot_mounting_style`;
CREATE TABLE `#__depot_mounting_style` (
`id` SERIAL,
`title` VARCHAR(100) NOT NULL DEFAULT '',
`ordering` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
AUTO_INCREMENT=0
DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO `#__depot_mounting_style` (`id`,`title`,`ordering`) VALUES
-- (0,'UNKNOWN',0),
(1,'SMD',1),
(2,'THD',2),
(3,'CHASSIS_MOUNT',3),
(4,'PRESS_FIT',4),
(5,'SCREW_MOUNT',5);

View File

@ -9,3 +9,4 @@ DROP TABLE IF EXISTS `#__depot`;
DROP TABLE IF EXISTS `#__depot_manufacturer`;
DROP TABLE IF EXISTS `#__depot_stock`;
DROP TABLE IF EXISTS `#__depot_package`;
DROP TABLE IF EXISTS `#__depot_mounting_style`;