-- USER simlab
CREATE USER 'simlab_admin'@'localhost' IDENTIFIED BY 'Simlab_Admin_098';


-- DATABASE simlab
CREATE DATABASE simlab
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_unicode_ci;

USE simlab;

-- Table login_group
-- -- Create Table
CREATE TABLE `role_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(50) NOT NULL,
  `keterangan` varchar(255) NOT NULL,
  `is_active` enum('1','0') NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT ON login_group TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `role_user` (`id`, `nama`, `keterangan`, `is_active`) VALUES
(1, 'Super Admin', 'Administrator Sistem Aplikasi', '1'),
(2, 'Manajer Teknis', 'Manajer Lab ', '1'),
(3, 'Analis', 'Analis Sampel', '1'),
(4, 'Penerima Sampel', 'Penerima Sampel', '1'),
(5, 'Penyelia', 'Penyelia Sampel', '1'),
(6, 'Operator LPD', 'Administrator Sistem Aplikasi', '1'),
(7, 'Deputi MT', 'Deputi Manajer Teknis', '1'),
(8, 'Penyiapan Sampel', 'Penyaiapan Sampel', '1'),
(9, 'Pengolah Data', 'Pengolah Data', '1');


-- Table user
-- -- Create Table
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `email` varchar(100),
  `real_name` varchar(100),
  `password` char(64) NOT NULL,
  `role_user` TINYTEXT,
  `role_analis` TINYTEXT,
  `is_active` enum('1','0') NOT NULL DEFAULT '1',
  `last_modified_user` int(11),
  `last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_unq__email` (`email`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON user TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `user` (`id`, `username`, `password`,`role_user`) VALUES
(1, 'uadmin', SHA2('admin', 256),'|1|');


  -- Table jabatan
    -- --  Create Table
  CREATE TABLE `jabatan` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `nama` varchar(100) NOT NULL,
    `singkatan` varchar(10),
    `detail` varchar(200),
    `urutan` TINYINT NOT NULL,
    `is_active` enum('0', '1') NOT NULL DEFAULT '1',
    `status` enum('0', '1') NOT NULL DEFAULT '0',
    PRIMARY KEY(`id`)
  ) ENGINE=InnoDB;

  -- -- -- grant For Table
  -- grant SELECT, INSERT, UPDATE ON `jabatan` TO 'simlab_admin'@'localhost';

  INSERT INTO jabatan(id, nama, urutan) VALUES
  (1, 'Pimpinan Unit Kerja Laboratorium Pakan', 1),
  (2, 'Manajer Teknis', 2),
  (3, 'Penyelia', 3),
  (4, 'Petugas Penyiapan Sampel', 4),
  (5, 'Petugas Penerima Sampel', 5),
  (6, 'Sekretaris Dinas/Manajer Administrasi', 6),
  (7, 'Bendahara Penerimaan Pembantu', 7);


-- Table personil
-- -- Create Table
CREATE TABLE `personil` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) NOT NULL,
  `id_jabatan` int NOT NULL,
  `nip` varchar(18),
  `pangkat` varchar(5),
  `alamat` varchar(255),
  `no_telp` varchar(100),
  `email` varchar(100),
  `file_foto` varchar(255),
  `id_user` int(11),
  `is_active` enum('1','0') NOT NULL DEFAULT '1',
  `last_modified_user` int(11) NOT NULL,
  `last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON personil TO 'simlab_admin'@'localhost';

-- -- Foreign Key
ALTER TABLE `personil`
  ADD CONSTRAINT `fk_personil__id_user` FOREIGN KEY (`id_user`) REFERENCES `user` (`id`),
  ADD CONSTRAINT `fk_personil__id_jabatan` FOREIGN KEY (`id_jabatan`) REFERENCES `jabatan` (`id`);


-- Table jenis_layanan
  -- --  Create Table
CREATE TABLE `jenis_layanan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `jenis_layanan` TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `jenis_layanan` (id, nama, singkatan, detail, urutan, is_active) VALUES
(1, 'Aktif', 'A', 'ambil sampel dari peternak melalui dinas kab/kota atau dari produsen pakan (Untuk pengawasan mutu pakan, gratis)', 1, '1'),
(2, 'Pasif', 'P', 'sampel datang dari peternak melalui dinas kab/kota atau dari produsen pakan (Bayar)', 2, '1'),
(3, 'Pasif Sertifikasi ', 'PS', 'sampel datang dari peternak melalui dinas kab/kota atau dari produsen pakan (Bayar, selain LHP dapat Sertifikat dan nomor pendaftaran, masa berlaku 5 tahun)', 3, '1'),
(4, 'Khusus', 'K', 'terima sampel dari sesama UPT, gratis', 4, '1'),
(5, 'Pasif Pesanan Khusus', 'PPK', 'Produsen uji coba pakan yang ditargetkan ke klien khusus', 5, '1'),
(6, 'Pasif Lelang', 'PL', '-', 6, '1');


-- Table status_sampel
  -- --  Create Table
CREATE TABLE `status_sampel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `status_sampel` TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `status_sampel` (id, nama, detail, urutan, is_active) VALUES
(1, 'Status I', 'Penerima Sampel', 1, '1'),
(2, 'Status II', 'Manajer Teknis', 2, '1'),
(3, 'Status III', 'Deputi Manajer Teknis', 3, '1'),
(4, 'Status IV', 'Penyiapan Sampel', 4, '1'),
(5, 'Status V', 'Penyelia', 5, '1'),
(6, 'Status VI', 'Analis', 6, '1'),
(7, 'Status VII', 'Penyelia', 7, '1'),
(8, 'Status VIII', 'Manajer Teknis', 8, '1'),
(9, 'Status IX', 'Penerima Sampel', 9, '1'),
(10, 'Status X', 'Pengolah Data', 10, '1'),
(11, 'Status XI', 'Penerima Sampel', 11, '1'),
(12, 'Status XII', 'Pimpinan Unit', 12, '1'),
(13, 'Status XIII', 'Penerima Sampel', 13, '1'),
(14, '0', 'Status Ditolak', 14, '1');


-- Table kondisi_sampel
-- --  Create Table
CREATE TABLE `kondisi_sampel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `kondisi_sampel` TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `kondisi_sampel` (id, nama, singkatan, urutan, is_active) VALUES
(1, 'Basah', 'B', 1, '1'),
(2, 'Kering', 'K', 2, '1'),
(3, 'Kadar Air 1', 'KA1', 3, '1');


-- Table penyimpanan_sampel
-- --  Create Table
CREATE TABLE `penyimpanan_sampel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `penyimpanan_sampel` TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `penyimpanan_sampel` (id, nama, singkatan, urutan, is_active) VALUES
(1, 'Freezer', 'Fz', 1, '1'),
(2, 'Refrigerator', 'Rf', 2, '1'),
(3, 'Ruang AC', 'R.AC', 3, '1');


-- Table parameter_uji
-- --  Create Table
CREATE TABLE `parameter_uji` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `parameter_uji` TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `parameter_uji` (id, nama, singkatan, detail, urutan, is_active) VALUES
(1, 'Air', 'Air', 'Proksimat', 1, '1'),
(2, 'Abu', 'Abu', 'Proksimat', 2, '1'),
(3, 'Protein Kasar', 'PK', 'Proksimat', 3, '1'),
(4, 'Lemak Kasar', 'LK', 'Proksimat', 4, '1'),
(5, 'Serat Kasar', 'SK', 'Proksimat', 5, '1'),
(6, 'Kalsium', 'Ca', NULL, 6, '1'),
(7, 'Fosfor', 'P', NULL, 7, '1'),
(8, 'Total Digestible Nutrient', 'TDN', NULL, 8, '1'),
(9, 'Urea', 'Ur', NULL, 9, '1'),
(10, 'Aflatoksin Total', 'Af', NULL, 10, '1'),
(11, 'Amylase Nuetral Detergent', 'aNDF', NULL, 11, '1'),
(12, 'Meat and Bone Meal', 'MBM', NULL, 12, '1');


-- Table metode_uji
-- --  Create Table
CREATE TABLE `metode_uji` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `metode_uji` TO 'simlab_admin'@'localhost';

-- Record Table
INSERT INTO `metode_uji`(id, nama, detail, urutan, is_active) VALUES
(1, 'Air', 'AOAC 2012 Bab 4 Butir 4.1.06 Metode 930.15', 1, '1'),
(2, 'Abu', 'AOAC 2012 Bab 4 Butir 4.1.10 Metode 942.05', 2, '1'),
(3, 'PK (a)', 'AOAC 2012 Bab 4 Butir 4.2.11 Metode 2001.11', 3, '1'),
(4, 'PK (b)', 'Gerhardt Analytical System', 4, '1'),
(5, 'LK', 'AOAC 2012 Bab 4 Butir 4.5.06 Metode 2003.6', 5, '1'),
(6, 'SK', 'SNI-01-2891-1992 Butir 11', 6, '1'),
(7, 'Ca (a)', 'AOAC 2012 Bab 4 Butir 4.8.03 Metode 927.02', 7, '1'),
(8, 'Ca (b)', 'AOAC 2012 Bab 4 Butir 4.8.02 Metode 968.08', 8, '1'),
(9, 'P', 'AOAC 2012 Bab 4 Butir 4.8.14 Metode 965.17', 9, '1'),
(10, 'TDN', 'Tropical Dairy Farming (John Moran)', 10, '1'),
(11, 'Ur', 'AOAC 2012 Bab 4 Butir 4.3.02 Metode 967.07', 11, '1'),
(12, 'Af', 'Agra Quant Total Aflatoxin Test Kit', 12, '1'),
(13, 'aNDF', 'AOAC 2012 Bab 4 Butir 4.6.04 Metode 2002.04', 13, '1'),
(14, 'MBM', 'Agra Strip Feedcheck for Detection of Meat and Bone Meal (MBM) ROMER', 14, '1');


-- Table klasifikasi
-- --  Create Table
CREATE TABLE `klasifikasi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `klasifikasi` TO 'simlab_admin'@'localhost';

-- Record Table
INSERT INTO `klasifikasi`(id, nama, urutan, is_active) VALUES
(1, 'SNI', 1 ,'1'),
(2, 'PTM', 2, '1'),
(3, 'NON PTM', 3, '1');


-- Table gol_jenis_sampel
-- -- Create Table
CREATE TABLE `gol_jenis_sampel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `gol_jenis_sampel` TO 'simlab_admin'@'localhost';

-- -- Record in Table
INSERT INTO `gol_jenis_sampel` (`id`, `nama`, `detail`, `urutan`, `is_active`) VALUES
(1, 'PR', 'Pakan Ruminansia', 1, '1'),
(2, 'PNR', 'Pakan Non Ruminansia', 2, '1'),
(3, 'BPAT', 'Bahan Pakan Asal Tumbuhan', 3, '1'),
(4, 'BPAH', 'Bahan Pakan Asal Hewan', 4, '1'),
(5, 'H', 'Hijauan', 5, '1'),
(6, 'FSYM', 'Feed Suplemen Yeast Mud', 6, '1'),
(7, 'FSM', 'Feed Suplemen Mineral', 7, '1');

-- Table jenis_sampel
-- -- Create Table
CREATE TABLE `jenis_sampel` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nama` varchar(100) NOT NULL,
`kode` varchar(50),
`id_klasifikasi` int NOT NULL,
`id_gol_sampel` int NOT NULL,
`kadar_air` varchar(20),
`kadar_abu` varchar(20),
`protein_kasar` varchar(20),
`lemak_kasar` varchar(20),
`serat_kasar` varchar(20),
`kalsium` varchar(20),
`fosfor` varchar(20),
`fosfor_plus` varchar(20),
`fosfor_minus` varchar(20),
`aflatoksin` varchar(20),
`andf` varchar(20),
`ndf` varchar(20),
`kecernaan_pepsin` varchar(20),
`tdn` varchar(20),
`de` varchar(20),
`udp` varchar(20),
`lisin` varchar(20),
`metionin` varchar(20),
`metionin_sistin` varchar(20),
`treonin` varchar(20),
`triptofan` varchar(20),
`is_active` enum('0', '1') NOT NULL DEFAULT '1',
PRIMARY KEY(id)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `jenis_sampel` TO 'simlab_admin'@'localhost';

-- -- Foreign Key
ALTER TABLE `jenis_sampel`
  ADD CONSTRAINT `fk_jenis_sampel__id_klasifikasi` FOREIGN KEY (`id_klasifikasi`) REFERENCES `klasifikasi` (`id`);
ALTER TABLE `jenis_sampel`
  ADD CONSTRAINT `fk_jenis_sampel__id_gol_sampel` FOREIGN KEY (`id_gol_sampel`) REFERENCES `gol_jenis_sampel` (`id`);

-- Records in Table
-- MBM&TEPUNG SNI (BPAH)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Mutu I', 'Meat Bone Meal mutu I', '10.0', '35.0', '50.0', '12.0', '3.0', '11.0', '3.0', NULL, 1, 4),
('Mutu II', 'Meat Bone Meal mutu II', '10.0', '38.0', '45.0', '14.0', '3.0', '13.0', '4.0', NULL, 1, 4),
('Mutu I', 'Tepung Ikan mutu I', '10', '20', '65', '8', '1.5', '2.5-5.0', '1.6-3.2', NULL, 1, 4),
('Mutu II', 'Tepung Ikan mutu II', '12', '25', '55', '10', '2.5', '2.5-6.0', '1.6-4.0', NULL, 1, 4),
('Mutu III', 'Tepung Ikan mutu III', '12', '30', '45', '12', '3', '2.5-7.0', '1.6-4.7', NULL, 1, 4),
('Mutu I', 'Tepung tulang mutu I', '8', NULL, NULL, '3', NULL, 'Min. 20', NULL, NULL, 1, 4),
('Mutu II', 'Tepung tulang mutu II', '8', NULL, NULL, '6', NULL, 'Min. 30', NULL, NULL, 1, 4),
(NULL, 'Tepang kerang', '3', NULL, NULL, NULL, NULL, 'Min. 35', 'Maks. 0.1', NULL, 1, 4),
(NULL, 'Tepung hasil ikutan unggas', '10.0', '18.0', '50.0', '14.0', '2.00', 'Maks. 7.0', 'Min. 2.0', NULL, 1, 4),
('Mutu I', 'Tepung bulu unggas', '10.0', '4.0', '80.0', NULL, '2.0', NULL, NULL, NULL, 1, 4),
('Mutu II', 'Tepung bulu unggas', '10.0', '6.0', '75.0', NULL, '3.0', NULL, NULL, NULL, 1, 4);



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

-- BAHAN 1-9 PTM (BPAT)
INSERT INTO `jenis_sampel` (`nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`andf`, `tdn`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Stylo (Stylosanthes guianensis)', '75.0', '9.0', '13.0', NULL, NULL, 'Min. 1.30', '0.20', NULL, '50.0', '55.0', 2, 3),
('Kaliandra', '75.0', '6.0', '20.0', NULL, NULL, '0.70-2.00', '0.20', NULL, '40.0', '60.0', 2, 3),
('Gamal', '78.0', '7.0', '22.0', NULL, NULL, '1.00-2.00', '0.20', NULL, '45.0', '60.0', 2, 3),
('Lamtoro', '75.0', '8.0', '22.0', NULL, NULL, '1.00-2.80', '0.15', NULL, '40.0', '65.0', 2, 3),
('Centro', '75.0', '8.0', '20.0', NULL, NULL, '1.00-2.00', '0.10', NULL, '50.0', '55.0', 2, 3),
('Siratro', '76.0', '9.0', '16.0', NULL, NULL, '1.00-2.00', '0.20', NULL, '55.0', '55.0', 2, 3),
('Tepung Carob', '12.0', '4.0', '4.0', NULL, NULL, NULL, NULL, NULL, '34.0', NULL, 2, 3),
('Jerami Tebu', '12.0', '8.0', '4.0', NULL, NULL, NULL, NULL, NULL, '67.0', NULL, 2, 3),
('Wheat Hay', '12.0', '9.0', '5.0', NULL, NULL, NULL, NULL, NULL, '65.0', NULL, 2, 3),
('Soya Lesitin', '1', NULL, NULL, '74.0', NULL, NULL, NULL, NULL, NULL, NULL, 2, 3),
('Rumput Setaria', '77.0', '10.0', '8.0', NULL, NULL, '0.17-0.45', '0.20', NULL, '65.0', '55.0', 2, 3),
('Rimput Benggala', '77.0', '10.0', '11.0', NULL, NULL, '0.50-1.00', '0.20', NULL, '65.0', '55.0', 2, 3),
('Turi', '75.0', '8.5', '25.0', NULL, NULL, '1.30-2.00', '0.25', NULL, '40.0', '65.0', 2, 3),
('Biji Kedelai Hitam', '10.0', '12.0', '10.0', '1.0', '36.0', NULL, NULL, NULL, '63.0', NULL, 2, 3),
('Konsentrat Protein Kedelai', '10.0', '6.0', '65.0', NULL, '4.0', NULL, NULL, '10', NULL, NULL, 2, 3),
('Biji Safflower', '12.0', '3.0', '15.0', '29.0', '20.0', NULL, NULL, '10', NULL, NULL, 2, 3),
('Bungkil Biji Niger', '10.0', '11.0', '27.0', '6.0', '24.0', NULL, NULL, '10', NULL, NULL, 2, 3),
('Biji Niger', '10', '5.2', '23', '38', '15', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Bungkil Biji Guar', '10.0', '6.0', '39.0', '4.0', '14.0', NULL, NULL, '20', NULL, NULL, 2, 3),
('Meadow Hay', '12.0', '8.0', '9.0', NULL, NULL, NULL, NULL, NULL, '34.0', NULL, 2, 3),
('Bungkil Lembaga Jagung', '12.0', '2.8', '21.0', '5.0', '13.0', NULL, NULL, NULL, '57', NULL, 2, 3),
('Konsentrat Protein Jagung', '10', NULL, '65', '2.5', '3.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Jerami Jagung', '10', '8', '3.5', '0.6', '42', '1.8-4.0', '0.3-1.3', NULL, NULL, NULL, 2, 3),
('Silase Jagung', '70.0', '4.0', '7.0', NULL, NULL, 'Maks. 20.0', 'Min. 0.15', NULL, '40.0', NULL, 2, 3),
('Biji Buckwheat', '10.0', '3.0', '11.0', '2.0', '11.0', NULL, NULL, '20', NULL, NULL, 2, 3),
('Biji Kedelai', '12.0', '6.0', '36.0', '18.0', '6.0', NULL, NULL, '10', NULL, NULL, 2, 3),
('Kulit ari Kedelai', '12.0', '5.0', '11.0', NULL, NULL, NULL, NULL, NULL, '64.0', NULL, 2, 3),
('Sekam Oat', '10.0', '7.0', '3.0', NULL, '36.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Pecahan Oat', '11.0', '5.0', '8.2', '3.2', '22.4', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Jerami Oat', '12.0', '12.0', '4.0', NULL, NULL, NULL, NULL, NULL, NULL, '76.0', 2, 3),
('Oat Hay', '10.0', '12.0', '8.0', NULL, NULL, NULL, NULL, NULL, NULL, '62.0', 2, 3),
('Biji Rye', '12.0', '2.0', '12.0', '1.5', '3.0', 'Maks. 0.10', 'Min. 0.30', NULL, NULL, NULL, 2, 3),
('Biji triticale', '12.0', '2.0', '12.0', '1.5', '5.0', 'Maks. 0.10', 'Min. 0.30', NULL, NULL, NULL, 2, 3),
('Distiller Drien Grains with Slubes', '13.0', '6.0', '25.0', '4.0', '10.0', NULL, NULL, '80', NULL, NULL, 2, 3),
('Biji rami', '12.0', '6.0', '25.0', '35.0', '7.0', 'Maks. 0.20', '0.50', NULL, NULL, NULL, 2, 3),
('Bungkil rami (cold pressed)', '10.0', '6.5', '32.0', '4.0', '13.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Bungkil rami (solvent extraction)', '12.0', '6.5', '34.0', '1.0', '13.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Biji kenari', '12.0', '8.0', '16.0', '4.0', '8.0', NULL, NULL, '5', NULL, NULL, 2, 3),
('Bungkil inti sawit', '10.0', '5.0', '18.0', '2.0', '21.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Millet', '12.0', '4.0', '13.0', '1.5', '8.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Biji oat', '12.0', '5.0', '10.0', '4.5', '12.0', 'Maks. 0.10', '0.30', NULL, NULL, NULL, 2, 3),
('bungkil biji kapas', '12.0', '7.0', '40.0', '2.0', '13.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Biji sorgum', '12.0', '2.0', '8.0', '3.0', '3.0', 'Maks. 0.50', 'Min. 0.20', NULL, NULL, NULL, 2, 3),
('Biji gandum', '12.0', '2.0', '12.0', '1.5', '2.0', '0.03-0.07', '0.30-0.50', NULL, NULL, NULL, 2, 3),
('Jerami gandum', '10.0', '10.0', '2.0', NULL, NULL, NULL, NULL, NULL, '0.86', NULL, 2, 3),
('Molases/sugarcane molasses', '34.0', '11.0', '3.0', NULL, NULL, NULL, NULL, '75', NULL, '75', 2, 3),
('Gaplek', '14.0', '5.0', '1.5', '1.0', '5.0', NULL, NULL, '80', NULL, '70', 2, 3),
('Onggok', '13.0', '8.0', NULL, NULL, '20.0', NULL, NULL, '50', NULL, NULL, 2, 3),
('Biji Rape/Biji kanola/rapeseed', '10.0', '5.0', '18.0', '45.0', '12.0', NULL, NULL, '10', NULL, NULL, 2, 3),
('Biji bunga matahari', '10.0', '5.0', '15.0', '35.0', '16.0', '1.50', NULL, '20', NULL, NULL, 2, 3),
('Bungkil biji bunga matahari', '10.0', '10.0', '31.0', '1.0', '20.0', NULL, NULL, '20', NULL, NULL, 2, 3),
('Biji wijen', '10.0', '4.5', '23.0', '50', '9.0', '1.7-1.8', '4.6-7.9', NULL, NULL, NULL, 2, 3),
('Bungkil biji wijen', '10.0', '13.0', '40.0', '7.0', '7.0', NULL, NULL, '10', NULL, NULL, 2, 3),
('Biji lupin', '12.0', '4.0', '33.0', '8.0', '17.0', 'Maks. 0.20', 'Min. 0.60', NULL, NULL, NULL, 2, 3),
('Bungkil Rape/Bungkil kanola/rapeseed', '12.0', '8.0', '35.0', '7.0', '12.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Ampas tahu', '14.0', '4.0', '22.0', '5.0', '20.0', '0.40-0.70', '0.20', '70', NULL, NULL, 2, 3),
('Alfalfa hay ', '11.0', '11.0', '23.0', '2.0', '28', NULL, NULL, NULL, NULL, NULL, 2, 3),
('Biji barli / Barley Grain', '12.0', '3.0', '10.0', '2.0', '5.0', 'Min. 0.10', '0.4', NULL, NULL, NULL, 2, 3),
('Daging Buah cokelat', '12.0', '12.0', '8.0', NULL, NULL, NULL, NULL, NULL, '53.0', NULL, 2, 3),
('Hay barli / Barley Hay', '14.0', '13.0', '8.0', NULL, '30.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('kulit ari biji coklat', '10.0', '10.0', '17.0', '4.0', '22.0', NULL, NULL, NULL, NULL, NULL, 2, 3),
('kulit kopi, Susu pengganti / Milk replacer', '14.0', '9.0', '9.0', NULL, '36.0', '0.30-0.70', '0.05', '50', NULL, NULL, 2, 3);



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

-- GANDUM SNI (BPAT)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Gandum', 'Wheat Pollard', '13.0', '5.0', '15.0', '3.5', '8.0', NULL, NULL, NULL, 1, 3),
('Gandum', 'Wheat Bran', '13.0', '6.0', '13.0', '2.5', '12.0', NULL, NULL, NULL, 1, 3);


-- BUNGKIL SNI (BPAT)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Mutu I', 'Bungkil Kelapa mutu I', '12.0', '7.0', '20.0', '6.0', '14.0', NULL, NULL, '50', 1, 3),
('Mutu II', 'Bungkil Kelapa mutu II', '12.0', '8.0', '18.0', '12.0', '16.0', NULL, NULL, '100', 1, 3),
('Mutu I', 'Bungkil kacang tanah mutu I', '12', '7', '46', '3.5', '12', '0.1-0.3', '0.40-0.75', '200', 1, 3),
('Mutu II', 'Bungkil kacang tanah mutu II', '12', '7', '40', '7.5', '14', '0.1-0.3', '0.40-0.75', '200', 1, 3),
('Mutu I', 'Bungkil kedelai mutu I', '12.0', '6.0', '46.0', '2.0', '5.0', NULL, NULL, NULL, 1, 3),
('Mutu II', 'Bungkil kedelai mutu II', '13.0', '8.0', '42.0', '3.0', '7.0', NULL, NULL, NULL, 1, 3),
('Mutu I', 'Bungkil Jagung mutu I', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 3),
('Mutu II', 'Bungkil Jagung mutu II', '12', NULL, '14', '2.0', '6.0', NULL, NULL, NULL, 1, 3);


-- DEDAK&JAGUNG SNI (BPAT)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Mutu I', 'Dedak padi mutu I', '13.0', '11.0', '12.0', NULL, '12.0', NULL, NULL, NULL, 1, 3),
('Mutu II', 'Dedak padi mutu II', '	13.0', '13.0', '10.0', NULL, '15.0', NULL, NULL, NULL, 1, 3),
('Mutu III', 'Dedak padi mutu III', '13.0', '15.0', '8.0', NULL, '18.0', NULL, NULL, NULL, 1, 3),
('Mutu I', 'Jagung mutu I', '14.0', NULL, '8.0', NULL, NULL, NULL, NULL, '100', 1, 3),
('Mutu II', 'Jagung mutu II', '16.0', NULL, '7.0', NULL, NULL, NULL, NULL, '150', 1, 3),
('Mutu I', 'Dedak Jagung mutu I', '12.0', NULL, '8.5', '4.0', '3.0', NULL, NULL, NULL, 1, 3),
('Mutu II', 'Dedak Jagung mutu II', '13.0', NULL, '8.5', '4.0', '6.0', NULL, NULL, NULL, 1, 3),
('CGM 60', 'Hasil ikutan pengolahan jagung', '12', '2.5', '60', '2.5', '3.0', NULL, NULL, '50', 1, 3),
('CGN 40', 'Hasil ikutan pengolahan jagung', '12', '3.5', '40', '2.5', '3.5', NULL, NULL, '50', 1, 3),
('CGF', 'Hasil ikutan pengolahan jagung', '12', '8', '20', '2.5', '11', NULL, NULL, '50', 1, 3);




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

-- LEGUMINOSA PTM (HIJAUAN)
INSERT INTO `jenis_sampel` (`nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`,
`ndf`, `tdn`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Indigofera', NULL, '11.00', '22.00', '2.60', NULL, 'Min. 0.6', 'Min. 0.3', '47.00', '70.00', 2, 5),
('Alfalfa', NULL, '13.50', '20.00', '1.80', NULL, 'Min 1.3', 'Min.0.2', '43.00', '65.00', 2, 5),
('Kaliandra', NULL, '12.00', '23.00', '2.00', NULL, '0.80', '0.30', '45.00', '65.00', 2, 5),
('Gamal', NULL, '13.00', '25.00', '2.00', NULL, '1.00', '0.20', '43.00', '65.00', 2, 5),
('Lamtoro', NULL, '10.00', '25.00', '1.50', NULL, '0.60', '0.20', '43.00', '70.00', 2, 5),
('Silase Jagung', NULL, '7.00', '6.00', '10.00', '12.00', '0.20', '0.15', NULL, NULL, 2, 5);


-- RUMPUT PTM (HIJAUAN)
INSERT INTO `jenis_sampel` (`nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`,
`ndf`, `tdn`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Rumput Gajah', NULL, '18.00', '10.00', '3.30', '35.00', '0.20-0.50', '0.20-0.40', NULL, NULL, 2, 5),
('Rumput raja', NULL, '15.00', '10.00', '3.90', '38.00', '0.20-0.70', '0.20-0.40', NULL, NULL, 2, 5),
('Rumput BD - (Brachiaria decumbers)', NULL, '12.00', '11.00', '1.70', NULL, 'Min. 0.3', 'Min. 0.2', '70.00', '52.00', 2, 5),
('Rumput BH - (Brachiaria humidicolas)', NULL, '10.00', '7.20', '2.00', NULL, 'Min. 0.1', 'Min 0.06', '70.00', '50.00', 2, 5),
('Rumput star grass - (rumput bintang)', NULL, '10.00', '12.00', '1.60', NULL, 'Min. 0.3', 'Min.0.15', '60.00', '55.00', 2, 5),
('Rumput sylo', NULL, '12.00', '13.00', '2.00', '32.00', '0.30', '0.20', '60.00', '50.00', 2, 5),
('Rumput Turi', NULL, '12.00', '11.00', '2.00', '32.00', '0.40', '0.20', '60.00', '55.00', 2, 5),
('Rumput Setaria', NULL, '12.00', '10.00', '2.00', '35.00', '0.60', '0.40', '65.00', '50.00', 2, 5);



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

-- PAKAN KUDA PTM (RUMANANSIA)
INSERT INTO `jenis_sampel` (`nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `de`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Pakan Kuda anak (sampai 12 bulan)', '14.00', '8.0', '16.00', '2.00', '8.00-14.00', '0.80', '0.50', '3600.00', 2, 1),
('Pakan kuda sebelum dewasa - (sampai 24 bulan)', '14.00', '8.0', '10.00', '2.00', '8.00-16.00', '0.40', '0.25', '2800.00', 2, 1),
('Pakan kuda dewasa', '14.00', '8.0', '8.00', '2.00', '8.00-16.00', '0.30', '0.20', '1800.00', 2, 1),
('Pakan kuda menyusui', '14.00', '8.0', '15.00', '2.00', '8.00-16.00', '0.60', '0.30', '1800.00', 2, 1),
('Pakan kuda bunting', '14.00', '8.0', '8.00', '2.00', '8.00-16.00', '0.30', '0.20', '3000.00', 2, 1),
('Pakan kuda pejantan', '14.00', '8.0', '8.00', '2.00', '8.00-16.00', '0.30', '0.20', '2000.00', 2, 1);


-- KAMBING&DOMBA PTM (RUMANANSIA)
INSERT INTO `jenis_sampel` (`nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `tdn`, `aflatoksin`,
`andf`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Kambing Lepas Sapih', NULL, NULL, '9-21.8', NULL, NULL, '0.19-0.23', '0.18-0.21', '60-70', NULL, NULL, 2, 1),
('Kambing Induk Laktasi - (awal laktasi)', NULL, NULL, '9.1-10.9', NULL, NULL, '0.27-0.30', '0.20-0.22', '55-60', NULL, NULL, 2, 1),
('Kambing Induk Laktasi - (akhir laktasi)', NULL, NULL, '8.2-10.0', NULL, NULL, '0.25-0.30', '0.18-0.22', '55-60', NULL, NULL, 2, 1),
('Kambing pejantan', NULL, NULL, '7.3-11.8', NULL, NULL, '0.15-0.21', '0.14-0.19', '50-65', NULL, NULL, 2, 1),
('Pakan konsentrat anak kambing perah', '13.0', '8.0', '16.0', '5.00', NULL, '0.3-0.8', 'Maks. 0.4', 'Min. 68', '150', '30', 2, 1),
('Pakan konsentrat kambing perah', '13.0', '9.0', '16.0', '7.00', NULL, '0.3-0.8', 'Maks. 0.4', 'Min. 65', '100', '35', 2, 1),
('Pakan konsentrat domba pemggemukan', '13.0', '8.0', '12.0', '7.00', NULL, '0.3-0.8', 'Maks. 0.25', 'Min. 65', '200', '35', 2, 1),
('Domba Lepas Sapih', NULL, NULL, '10.0-22.5', NULL, NULL, '0.25-1.20', '0.23-1.0', '60-90', NULL, NULL, 2, 1),
('Domba Bunting', NULL, NULL, '7.8-9.8', NULL, NULL, '0.23-0.38', '0.17-0.28', '50-60', NULL, NULL, 2, 1),
('Domba Jantan', NULL, NULL, '6.9-11.8', NULL, NULL, '0.14-0.40', '0.13-0.36', '50-65', NULL, NULL, 2, 1);


-- KSP SNI (RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`andf`, `udp`, `tdn`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('KSP1', 'Konsentrat sapi perah Pemula-1', '14.00', '10.00', '21.00', '12.00', NULL, '0.70-0.90', '0.40-0.60', '50', '15.00', 'TD', '80', 1, 1),
('KSP2', 'Konsentrat sapi perah Pemula-2', '14.00', '10.00', '16.00', '7.00', NULL, '0.60-0.80', '0.40-0.60', '100', '20.00', '6.40', '70', 1, 1),
('KSP3', 'Konsentrat sapi perah Dara', '14.00', '10.00', '15.00', '7.00', NULL, '0.60-1.00', '0.40-0.60', '200', '30.00', '6.00', '70', 1, 1),
('KSP4', 'Konsentrat sapi perah Laktasi', '14.00', '10.00', '14.00', '7.00', NULL, '0.60-1.20', '0.40-0.60', '100', '35.00', '5.60', '68', 1, 1),
('KSP5', 'Konsentrat sapi perah Laktasi Produksi tinggi', '14.00', '10.00', '18.00', '7.00', NULL, '0.80-1.30', '0.40-0.80', '100', '33.00', '7.20', '68', 1, 1),
('KSP6', 'Konsentrat sapi perah Kering Bunting', '14.00', '10.00', '16.00', '7.00', NULL, '0.80-1.20', '0.40-0.80', '100', '33.00', '6.40', '68', 1, 1),
('KSP7', 'Konsentrat sapi perah Pejantan', '14.00', '12.00', '12.00', '6.00', NULL, '0.60-0.80', '0.30-0.60', '200', '35.00', '4.80', '65', 1, 1);


-- KSPT SNI (RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`andf`, `udp`, `tdn`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('KSPT1', 'Pakan Konsentrat Sapi Penggemukan', '14.00', '12.00', '13.00', '7.00', NULL, '0.60-1.20', '0.40-0.80', '200', '35.00', '4.80', '68', 1, 1),
('KSPT2', 'Pakan Konsentrat Sapi Induk', '14.00', '12.00', '12.00', '6.00', NULL, '0.80-1.20', '0.60-0.80', '200', '35.00', '4.80', '65', 1, 1),
('KSPT3', 'Pakan Konsentrat Sapi Pejantan', '14.00', '12.00', '12.00', '6.00', NULL, '0.60-0.80', '0.30-0.60', '200', '35.00', '4.80', '65', 1, 1);



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

-- RUMINANSIA BESAR PTM (RUMANANSIA)
INSERT INTO `jenis_sampel` (`nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`, `andf`, `kecernaan_pepsin`, `tdn`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('Pakan konsentrat kerbau perah', '14.0', '12.0', '14.0', '6.0', NULL, '0.8-1.0', '0.6-0.8', '100', '37', '5.0', '65', 2, 1),
('Pakan konsentrat kerbau potong', '14.0', '12.0', '13.0', '6.0', NULL, '0.5-0.7', '0.3-0.5', '200', '40', '5.0', '65', 2, 1),
('Pakan komplit starter (sapi/kerbau)', '14.0', '11.0', '14.0', '7.0', NULL, '0.5-1.2', '0.3-0.8', '150', '50', '6.0', '60', 2, 1),
('Pakan komplit penggumukan (sapi/kerbau)', '14.0', '11.0', '12.0', '7.0', NULL, '0.5-1.2', '0.3-0.8', '150', '50', '5.0', '60', 2, 1),
('Pakan komplit sapi perah laktasi', '14.0', '12.0', '14.0', '5.0', NULL, '0.7-1.2', '0.4-0.8', '100', '40', '6.0', '65', 2, 1),
('Pakan komplit sapi perah masa kering', '14.0', '12.0', '12.0', '4.0', NULL, '0.7-1.2', '0.4-0.8', '100', '42', '5.0', '60', 2, 1),
('Pakan anak sapi Susu pengganti / Milk replacer', '10.0', NULL, '22.0', '20.0', NULL, '0.8-1.3', 'Maks. 0.7', NULL, NULL, NULL, NULL, 2, 1),
('Pakan konsentrat sapi perah Konsenrat sapi donor', '14.0', '10.0', '16.0', '7.0', NULL, '0.8-1.0', '0.6-0.8', '200', '37', '6.4', '70', 2, 1),
('Pakan konsentrat sapi perah Konsentrat sapi induk dan resipien', '14.0', '12.0', '12.0', '6.0', NULL, '0.5-0.7', '0.3-0.8', '200', '30', '4.2', '65', 2, 1),
('Pakan konsentrat pejantan Berat badan 600 - 800 kg', '14.0', '12.0', '14.0', '7.0', NULL, '0.6-0.8', 'Min. 0.4', '200', '35', '5.6', '65', 2, 1),
('Pakan konsentrat pejantan Berat badan > 800 kg', '14.0', '12.0', '16.0', '7.0', NULL, '0.6-0.8', 'Min. 0.4', '200', '35', '5.6', '65', 2, 1);



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

-- BB SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`, `id_klasifikasi`, `id_gol_sampel`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`) VALUES
('BB1', 'Pakan Burung - (Mutu I)', 1, 2, '12.00', '9.00', '14.00', '3.00', '9.00', '0.80-2.00', '0.50', NULL, NULL, NULL, NULL, NULL, NULL),
('BB2', 'Pakan Burung - (Mutu II)', 1, 2, '12.00', '4.00', '8.00', '3.00', '9.00', 'TD', 'TD', NULL, NULL, NULL, NULL, NULL, NULL);


-- PK SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`, `id_klasifikasi`, `id_gol_sampel`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`) VALUES
('pk1', 'Pakan Kelinci - (Mudah/pertumbuhan)', 1, 2, '12.00', '14.00', '16.00', '2.00', '14.00', '0.50', '0.40', NULL, '0.70', NULL, '0.50', NULL, NULL),
('pk2', 'Pakan Kelinci - (Peliharaan/dewasa)', 1, 2, '12.00', '14.00', '15.00', '2.00', '14.00', '0.80', '0.50', NULL, '0.70', NULL, '0.50', NULL, NULL),
('pk3', 'Pakan Kelinci - (Bunting/menyusui)', 1, 2, '12.00', '14.00', '18.00', '2.00', '12.00', '0.80', '0.60', NULL, '0.90', NULL, '0.60', NULL, NULL);


-- IBR SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`, `id_klasifikasi`, `id_gol_sampel`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `fosfor_minus`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`) VALUES
('IBR1', 'Pakan Itik Pedaging - (Starter)', 1, 2, '14.0', '8.0', '20.0', '3.0', '5.0', '0.80-1.20', '0.45', '0.60', '25', '1.00', '0.37', '0.70', '0.60', '0.16'),
('IBR2', 'Pakan Itik Pedaging - (Grower)', 1, 2, '14.0', '8.0', '18.0', '3.0', '5.0', '0.80-1.20', '0.45', '0.60', '25', '0.75', '0.28', '0.55', '0.48', '0.12');


-- IP&KIP SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`, `id_klasifikasi`, `id_gol_sampel`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor_plus`, `fosfor_minus`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`) VALUES
('IP1', 'Pakan Itik petelur - (laying duck starter)', 1, 2, '14.00', '9.0', '18.00', '3.00', '8.00', '0.80-1.20', 'Min. 0.50', '0.60', '20', '0.85', '0.38', '0.57', NULL, NULL),
('IP2', 'Pakan Itik petelur - (laying duck grower)', 1, 2, '14.00', '11.0', '15.00', '3.00', '9.00', '0.80-2.00', 'Min. 0.40', '0.50', '20', '0.65', '0.30', '0.50', NULL, NULL),
('IP3', 'Pakan Itik petelur - (duck layer)', 1, 2, '14.00', '14.0', '17.00', '3.00', '10.00', '2.90-4.25', 'Min. 0.45', '0.55', '20', '0.90', '0.40', '0.70', NULL, NULL),
('KIP', 'Pakan Konsentrat Itik - petelur', 1, 2, '12.0', '38.0', '36.0', '2.0', '8.0', '11.0-16.0', '1.20-1.80', NULL, '30', '2.00', '1.20', '1.60', NULL, '0.35');


-- BRS SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('BRS1', 'Pakan Ayam buras - (Starter)', '14.0', '8.0', '19.0', '3.0', '7.0', '0.9-1.2', '0.60-1.0', '50', '0.87', '0.37', '0.55', ' ', '0.18', 1, 2),
('BRS2', 'Pakan Ayam buras - (Grower)', '14.0', '8.0', '14.0', '3.0', '8.0', '0.9-1.2', '0.55-1.00', '50', '0.70', '0.27', '0.45', NULL, '0.17', 1, 2),
('BRS3', 'Pakan Ayam buras - (Layer)', '14.0', '14.0', '16.0', '3.0', '8.0', '2.75-4.25', '0.60-1.00', '50', '0.70', '0.30', '0.50', NULL, '0.15', 1, 2);


-- PSP SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('PSP1', 'Pakan Bibit ayam Petelur - (Starter)', '13.0', '8.0', '19.0', '3.0', '6.0', '0.9-1.2', '0.6-0.9', '40', '1.10', '0.48', '0.75', NULL, '0.20', 1, 2),
('PSP2', 'Pakan Bibit ayam Petelur - (Grower)', '13.0', '8.0', '17.0', '3.0', '6.0', '0.9-1.2', '0.6-0.9', '40', '0.95', '0.41', '0.70', NULL, '0.18', 1, 2),
('PSP3', 'Pakan Bibit ayam Petelur - (Pullet)', '13.0', '8.0', '15.0', '3.0', '6.0', '0.8-1.2', '0.6-0.9', '40', '0.75', '0.34', '0.50', NULL, '0.16', 1, 2),
('PSP4', 'Pakan Bibit ayam Petelur - pre layer', '	13.0', '12.0', '16.0', '3.0', '6.5', '1.5-2.5', '0.6-0.9', '40', '0.80', '0.41', '0.62', NULL, '0.18', 1, 2),
('PSP5', 'Pakan Bibit ayam Petelur - (Layer)', '13.0', '14.0', '16.0', '3.0', '6.5', '2.7-4.0', '0.6-0.9', '40', '0.80', '0.41', '0.62', NULL, '0.18', 1, 2),
('PSP6', 'Pakan Bibit ayam Petelur - (Jantan)', '13.0', '8.0', '12.5', '3.0', '7.0', '0.8-1.2', '0.6-0.9', '40', '0.65', '0.30', '0.50', NULL, '0.16', 1, 2);


-- PSBR SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('PSBR1', 'Pakan Bibit ayam Pedaging - (Starter1)', '13.0', '8.0', '19.0', '3.0', '5.0', '0.9-1.2', '0.6-0.8', '40.0', '1.05', '0.45', '0.77', NULL, '0.20', 1, 2),
('PSBR2', 'Pakan Bibit ayam Pedaging - (Starter2)', '13.0', '8.0', '17.0', '3.0', '5.0', '0.9-1.2', '0.6-0.8', '40.0', '0.86', '0.36', '0.69', NULL, '0.14', 1, 2),
('PSBR3', 'Pakan Bibit ayam Pedaging - (Grower)', '13.0', '8.0', '15.0', '3.0', '6.0', '0.9-1.2', '0.6-0.8', '40.0', '0.64', '0.27', '0.52', NULL, '0.11', 1, 2),
('PSBR4', 'Pakan Bibit ayam Pedaging - pre layer', '13.0', '12.0', '16.0', '3.0', '6.0', '1.5-2.5', '0.6-0.8', '40.0', '0.67', '0.34', '0.61', NULL, '0.16', 1, 2),
('PSBR5', 'Pakan Bibit ayam Pedaging - (Layer)', '13.0', '14.0', '16.0', '3.0', '6.0', '3.0-4.0', '0.6-0.8', '40.0', '0.75', '0.40', '0.69', NULL, '0.17', 1, 2),
('PSBR6', 'Pakan Bibit ayam Pedaging - (Jantan)', '13.0', '8.0', '14.0', '3.0', '7.0', '0.9-1.2', '0.6-0.8', '40.0', '0.65', '0.30', '0.50', NULL, '0.15', 1, 2);


-- B&KB SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('B1', 'Pakan Babi - (pig prestarter)', '14.0', '7.0', '19.0', 'Maks 7.0', '4.0', '0.90-1.20', '0.60-1.00', '50.0', '1.15', '0.40', '0.60', NULL, NULL, 1, 2),
('B2', 'Pakan Babi - (pig starter)', '14.0', '7.0', '17.0', 'Maks 7.0', '5.0', '0.90-1.20', '0.60-1.00', '50.0', '1.05', '0.35', '0.60', NULL, NULL, 1, 2),
('B3', 'Pakan Babi - (pig grower)', '14.0', '8.0', '15.0', 'Maks 7.0', '7.0', '0.90-1.20', '0.60-1.00', '50.0', '0.90', '0.30', '0.60', NULL, NULL, 1, 2),
('B4', 'Pakan Babi - (pig finisher)', '14.0', '8.0', '13.0', 'Maks 8.0', '7.0', '0.90-1.20', '0.60-1.00', '50.0', '0.70', '0.30', '0.50', NULL, NULL, 1, 2),
('B5', 'Pakan Babi - (pregnant sow ration)', '14.0', '8.0', '13.0', 'Maks 7.0', '8.0', '0.90-1.20', '0.60-1.00', '50.0', '0.60', '0.20', '0.40', NULL, NULL, 1, 2),
('B6', 'Pakan Babi - (boar ration)', '14.0', '8.0', '14.0', 'Maks 7.0', '7.0', '0.90-1.20', '0.60-1.00', '50.0', '0.60', '0.25', '0.40', NULL, NULL, 1, 2),
('B7', 'Pakan Babi - (lactating ration)', '14.0', '8.0', '15.0', 'Maks 8.0', '7.0', '0.90-1.20', '0.60-1.00', '50.0', '0.80', '0.30', '0.50', NULL, NULL, 1, 2),
('KB1', 'Pakan Konsentrat Babi - (Anak babi sapihan)', '12.0', '20.0', '30.0', 'Min 3.0', '8.0', '3.0-5.0', '1.2.2.0', '30', '2.2', '0.6', '1.1', NULL, '0.34', 1, 2),
('KB2', 'Pakan Konsentrat Babi - (Induk)', '12.0', '20.0', '26.0', 'Min 3.0', '10.0', '3.0-5.0', '1.2-1.8', '30', '1.30', '0.35', '0.70', NULL, '0.20', 1, 2);


-- PP SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('PP1', 'Pakan Puyuh Petelur - (Quail Starter)', '14.0', '8.0', '19.0', '7.0', '6.5', '0.90-1.20', '0.60-1.00', '40.0', '1.10', '0.40', '0.60', NULL, NULL, 1, 2),
('PP2', 'Pakan Puyuh Petelur - (quail grower)', '14.0', '8.0', '17.0', '7.0', '7.0', '0.90-1.20', '0.60-1.00', '40.0', '0.80', '0.35', '0.50', NULL, NULL, 1, 2),
('PP3', 'Pakan Puyuh Petelur - (quail layer)', '14.0', '14.0', '17.0', '7.0', '7.0', '2.50-3.50', '0.60-1.00', '40.0', '0.90', '0.40', '0.60', NULL, NULL, 1, 2);


-- P&KP SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor_plus`, `fosfor_minus`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('P0', 'Pakan Ayam Petelur - (Layer pre stater)', '13.00', '8.0', '20.00', '3.00', '6.00', '0.80-1.20', '0.50', '0.60', '50', '1.00', '0.50', '0.80', '0.20', '0.75', 1, 2),
('P1', 'Pakan Ayam Petelur - Layer Starter', '13.00', '8.00', '19.00', '3.00', '7.00', '0.80-1.20', '0.45', '0.55', '50', '0.90', '0.40', '0.70', '0.18', '0.65', 1, 2),
('P2', 'Pakan Ayam Petelur - (layer grower)', '13.00', '8.00', '15.50', '3.00', '8.00', '0.80-1.20', '0.36', '0.46', '50', '0.70', '0.30', '0.60', '0.17', '0.50', 1, 2),
('PL', 'Pakan Ayam Petelur - Sebelum produksi (Pre Layer)', '13.00', '12.00', '16.00', '3.00', '8.00', '2.00-2.70', '0.40', '0.50', '50', '0.75', '0.35', '0.63', '0.17', '0.52', 1, 2),
('P3', 'Pakan Ayam Petelur - (layer)', '13.00', '14.00', '16.50', '3.00', '7.00', '3.25-4.25', '0.45', '0.55', '50', '0.80', '0.40', '0.67', '0.18', '0.55', 1, 2),
('P4', 'Pakan Ayam Petelur -  (layer pospeak)', '13.00', '15.00', '16.00', '3.00', '8.00', '3.50-4.50', '0.40', '0.50', '50', '0.75', '0.35', '0.65', '0.17', '0.50', 1, 2),
('KP2', 'Pakan Konsentrat Ayam Petelur - (Konsentrat layer grower)', '12.00', '15.00', '28.00', '2.00', '8.00', '2.30-3.50', '0.50', '0.80', '40', '1.40', '0.52', '1.10', '0.32', '0.75', 1, 2),
('KP3', 'Pakan Konsentrat Ayam Petelur -  (Konsentrat layer)', '12.00', '35.00', '30.00', '2.00', '9.00', '9.00-12.00', '0.50', '0.80', '40', '1.70', '0.80', '1.30', '0.34', '1.10', 1, 2);


-- BR SNI (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`kode`, `nama`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor_plus`, `fosfor_minus`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`,
`id_klasifikasi`, `id_gol_sampel`) VALUES
('BR0', 'Pakan Ayam Pedaging (Broiler) - Sebelum masa awal (pre starter)', '14', '8', '22', '5', '4', '0.80-1.10', '0.50', '0.60', '40', '1.30', '0.50', '0.90', '0.80', '0.20', 1, 2),
('BR1', 'Pakan Ayam Pedaging (Broiler) - Broiler starter', '14', '8', '20', '5', '5', '0.80-1.10', '0.50', '0.60', '50', '1.20', '0.45', '0.80', '0.75', '0.19', 1, 2),
('BR2', 'Pakan Ayam Pedaging (Broiler) Broiler finisher', '14', '8', '19', '5', '6', '0.80-1.10', '0.45', '0.55', '50', '1.05', '0.40', '0.75', '0.65', '0.18', 1, 2),
('KBR', 'Pakan Konsentrat Ayam Pedaging Konsentrat Broiler', '12.00', '15.00', '37.00', '3.00', '8.00', '2.20-3.20', '0.50', '0.80', '40', '2.50', '0.90', '1.70', '1.30', '0.40', 1, 2);



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

-- PAKAN KUDA PTM (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`nama`, `id_klasifikasi`, `id_gol_sampel`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor_minus`, `aflatoksin`) VALUES
('Pakan kuda anak	(sampai 12 bulan)', 2, 2, '13.0', '9.0', '13.0', '2.0', '8.0', 'Min.0.8', '0.20', '30'),
('Pakan kuda muda (sampai 24 bulan)', 2, 2, '13.0', '9.0', '12.0', '2.0', '8.0', 'Min.0.6', '0.20', '30'),
('Pakan kuda dewasa', 2, 2, '13.0', '9.0', '8.0', '2.0', '8.0', 'Min.0.4', '0.20', '30'),
('Pakan kuda bunting', 2, 2, '13.0', '8.0', '8.0', '2.0', '8.0', 'Min.0.4', '0.20', '30'),
('Pakan kuda menyusui', 2, 2, '13.0', '10.0', '14.0', '2.0', '8.0', 'Min.0.8', '0.40', '30'),
('Pakan kuda pejantan', 2, 2, '13.0', '8.0', '8.0', '2.0', '8.0', 'Min.0.5', '0.25', '30'),
('Pakan kuda performans sedang', 2, 2, '13.0', '8.0', '10.0', '3.0', '8.0', 'Min.0.5', '0.25', '30'),
('Pakan kuda performans berat', 2, 2, '13.0', '8.0', '12.0', '3.0', '8.0', 'Min.0.5', '0.25', '30');


-- PAKAN BIBIT ITIK PTM (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`nama`, `id_klasifikasi`, `id_gol_sampel`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor_plus`, `fosfor_minus`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`) VALUES
('Pakan bibit induk itik pedaging starter', 2, 2, '13.0', '8.0', '20.0', '2.0', '8.0', '0.80-1.20', '0.50', '0.60', '20', '0.90', '0.40', '0.65', '0.60', '0.20'),
('Pakan bibit induk itik pedaging grower', 2, 2, '13.0', '8.0', '16.0', '2.0', '8.0', '0.80-1.20', '0.40', '0.50', '20', '0.75', '0.35', '0.60', '0.50', '0.18'),
('Pakan bibit induk itik pedaging layer', 2, 2, '13.0', '14.0', '18.0', '2.0', '9.0', '2.75-4.00', '0.45', '0.55', '20', '0.85', '0.30', '0.70', '0.55', '0.16'),
('Pakan bibit induk itik petelur starter', 2, 2, '13.0', '8.0', '20.0', '2.0', '8.0', '0.80-1.20', '0.50', '0.60', '20', '0.90', '0.40', '0.55', '0.60', '0.20'),
('Pakan bibit induk itik petelur grower', 2, 2, '13.0', '8.0', '16.0', '2.0', '8.0', '0.80-1.20', '0.40', '0.50', '20', '0.75', '0.30', '0.60', '0.50', '0.18'),
('Pakan bibit induk itik petelur layer', 2, 2, '13.0', '14.0', '18.0', '2.0', '9.0', '2.75-4.00', '0.45', '0.55', '20', '0.75', '0.35', '2.00', '0.55', '0.19');


-- KONSENTRAT PTM (NON RUMANANSIA)
INSERT INTO `jenis_sampel` (`nama`, `id_klasifikasi`, `id_gol_sampel`,
`kadar_air`, `kadar_abu`, `protein_kasar`, `lemak_kasar`, `serat_kasar`, `kalsium`, `fosfor_plus`, `fosfor_minus`, `aflatoksin`,
`lisin`, `metionin`, `metionin_sistin`, `treonin`, `triptofan`) VALUES
('Pakan Konsentrat Ayam Buras petelur', 2, 2, '14.0', '35.0', '24.0', '2.0', '9.0', '8.00-12.00', '0.50', '0.80', '50', '1.60', '0.60', '0.90', NULL, '0.25'),
('Pakan Konsentrat Ayam Buras pedaging', 2, 2, '14.0', '16.0', '26.0', '2.0', '9.0', '2.00-3.50', '0.50', '0.80', '50', '1.80', '0.70', '1.00', NULL, '0.27'),
('Pakan Konsentrat Itik pedaging', 2, 2, '14.0', '15.0', '34.0', '2.0', '9.0', '2.00-3.50', '0.50', '0.80', '20', '2.50', '1.50', '2.00', NULL, '0.40'),
('Pakan Konsentrat puyuh petelur', 2, 2, '14.0', '35.0', '34.0', '2.0', '9.0', '8.00-12.00', '0.50', '0.80', '30', NULL, NULL, NULL, NULL, NULL),
('Pakan Konsentrat puyuh grower', 2, 2, '14.0', '15.0', '28.0', '2.0', '8.0', '2.00-4.00', '0.50', '0.80', '30', NULL, NULL, NULL, NULL, NULL);

-- Table bentuk_sampel
-- -- Create Table
CREATE TABLE `bentuk_sampel`(
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `bentuk_sampel` TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `bentuk_sampel` (`id`, `nama`, `detail`, `urutan`, `is_active`) VALUES
(1, 'Cair', 'Cair', 1, '1'),
(2, 'Basah', 'Padat', 2, '1'),
(3, 'Lembab', 'Padat', 3, '1'),
(4, 'Kering', 'Padat', 4, '1');


-- Table penanganan_sampel
-- --  Create Table
CREATE TABLE `penanganan_sampel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `penanganan_sampel` TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `penanganan_sampel` (id, nama, urutan, is_active) VALUES
(1, 'Kering', 3, '1'),
(2, 'Lembab', 2, '1'),
(3, 'Basah', 1, '1');


-- Table jenis_penanganan_sampel
-- -- Create Table
CREATE TABLE `jenis_penanganan_sampel`(
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `jenis_penanganan_sampel` TO 'simlab_admin'@'localhost';

-- -- Records in Table
INSERT INTO `jenis_penanganan_sampel` (`id`, `nama`, `detail`, `urutan`, `is_active`) VALUES
(1, 'Cair', 'Arsip', 1, '1'),
(2, 'Tanpa Dioven', 'Arsip', 2, '1'),
(3, 'Dioven', 'Arsip', 3, '1'),
(4, 'Uji MBM', 'Kerja', 4, '0'),
(5, 'Selain Uji Aflatoksin', 'kerja', 5, '1'),
(6, 'Uji Aflatoksin', 'Kerja', 6, '1');


-- Table jenis_grinder
-- -- Create Table
CREATE TABLE `jenis_grinder` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `singkatan` varchar(10),
  `detail` varchar(200),
  `urutan` TINYINT NOT NULL,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `jenis_grinder` TO 'simlab_admin'@'localhost';

-- -- Record in Table
INSERT INTO `jenis_grinder` (`id`, `nama`, `urutan`, `is_active`) VALUES
(1, 'Xi Liang', 1, '1'),
(2, 'FOSS', 2, '1'),
(3, 'yellow Line', 3, '1');


-- Table permintaan_uji
-- --  Create Table
CREATE TABLE `permintaan_uji`(
`id` int NOT NULL AUTO_INCREMENT,
`id_status` int NOT NULL,
`id_layanan` int NOT NULL,
`registrasi_laboratorium` varchar(20) NOT NULL,
`tgl_pukul_pengambilan` datetime,
`tgl_pukul_registrasi` datetime,
`perkiraan_estimasi_selesai_lhp` datetime,
`tgl_pukul_mulai_uji` datetime,
`tgl_pukul_terbit_lhu` datetime,
`tgl_pukul_terbit_lhp` datetime,
`tgl_surat` date,
`nomor_surat` int,
`instansi_umum` varchar(100),
`alamat` varchar(255),
`nomor_telepon` varchar(20),
`email_pemohon` varchar(100),
`nama_pemohon` varchar(100),
`sumber_dana` varchar(20),
`keterangan` varchar(200),
`kaji_ulang_permintaan` varchar(100),
`tgl_penyiapan_sampel` date,
`is_active` enum('0', '1') NOT NULL DEFAULT '1',
`last_modified_user` int(11),
`last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `permintaan_uji` TO 'simlab_admin'@'localhost';

-- -- Foreign Key
ALTER TABLE `permintaan_uji`
  ADD CONSTRAINT `fk_permintaan_uji__id_layanan` FOREIGN KEY (`id_layanan`) REFERENCES `jenis_layanan` (`id`);
ALTER TABLE `permintaan_uji`
  ADD CONSTRAINT `fk_permintaan_uji__id_status` FOREIGN KEY (`id_status`) REFERENCES `status_sampel` (`id`);


-- Table data_sampel
  -- --  Create Table
CREATE TABLE `data_sampel`(
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_uji` int NOT NULL,
`asal_sampel` varchar(100),
`jenis_sampel_lainnya` varchar(100),
`kualitas` enum('Baik', 'Tidak Baik'),
`bentuk_jenis` varchar(100),
`jenis_pengujian` varchar(100) COMMENT 'Mengacu ke table parameter uji. Contoh Format: |1|5|',
`label_pakan` varchar(100),
`petugas_pengambil_sampel` varchar(100),
`id_keterangan` int,
`klasifikasi` int NOT NULL,
`is_active` enum('0', '1') NOT NULL DEFAULT '1',
`last_modified_user` int(11),
`last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `data_sampel` TO 'simlab_admin'@'localhost';


-- Table disposisi
-- -- Create Table
CREATE TABLE disposisi (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_sampel` int NOT NULL,
  `kemasan` varchar(100),
  `id_penanganan_sampel` int,
  `berat_sampel` int,
  `satuan_berat` enum('mili liter', 'gram'),
  `id_kondisi_sampel` int,
  `id_sampel_kerja` int,
  `id_sampel_arsip` int,
  `keterangan` varchar(200),
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  `last_modified_user` int(11),
  `last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`)
) ENGINE=innoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `disposisi` TO 'simlab_admin'@'localhost';

-- -- Foreign Key
ALTER TABLE `disposisi`
  ADD CONSTRAINT `fk_disposisi__id_sampel` FOREIGN KEY (`id_sampel`) REFERENCES `data_sampel` (`id`);
ALTER TABLE `disposisi`
  ADD CONSTRAINT `fk_disposisi__id_penanganan_sampel` FOREIGN KEY (`id_penanganan_sampel`) REFERENCES `penanganan_sampel` (`id`);
ALTER TABLE `disposisi`
  ADD CONSTRAINT `fk_disposisi__id_kondisi_sampel` FOREIGN KEY (`id_kondisi_sampel`) REFERENCES `kondisi_sampel` (`id`);
ALTER TABLE `disposisi`
  ADD CONSTRAINT `fk_disposisi__id_sampel_kerja` FOREIGN KEY (`id_sampel_kerja`) REFERENCES `penyimpanan_sampel` (`id`);
ALTER TABLE `disposisi`
  ADD CONSTRAINT `fk_disposisi__id_sampel_arsip` FOREIGN KEY (`id_sampel_arsip`) REFERENCES `penyimpanan_sampel` (`id`);


-- Table penyiapan_sampel
-- -- Create Table
CREATE TABLE `penyiapan_sampel` (
`id` int(11) AUTO_INCREMENT,
`pukul_mulai` time,
`pukul_selesai` time,
`id_sampel` int,
`id_bentuk_sampel` varchar(20),
`id_penanganan_arsip` varchar(100),
`id_penanganan_kerja` varchar(100),
`ket_penanganan_kerja` varchar(100),
`id_grinder` int,
`keterangan` varchar(200),
`is_active` enum('0', '1') NOT NULL DEFAULT '1',
`last_modified_user` int,
`last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
)ENGINE=InnoDB;


-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE, DELETE ON `penyiapan_sampel` TO 'simlab_admin'@'localhost';

-- -- Foreign Key
ALTER TABLE `penyiapan_sampel`
  ADD CONSTRAINT `fk_penyiapan_sampel__id_sampel` FOREIGN KEY (`id_sampel`) REFERENCES `data_sampel` (`id`);


-- Table bahan_kimia
-- --  Create Table
CREATE TABLE pelayuan_sampel(
  id int(11) AUTO_INCREMENT,
  id_sampel int,
  tgl_pukul_sebelum_dioven datetime,
  berat_segar decimal(5,2),
  tgl_pukul_setelah_dioven datetime,
  berat_kering decimal(5,2),
  kadar_air decimal(5,2),
  nama_pelaksana varchar(100),
  paraf_pelaksana text,
  paraf_penyelia text,
  keterangan text,
  is_active enum('0', '1') default '1',
  last_modified_time datetime default CURRENT_TIMESTAMP,
  last_modified_user int,
  PRIMARY KEY(id)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE, DELETE ON `pelayuan_sampel` TO 'simlab_admin'@'localhost';

-- Table kadar_air
-- --  Create Table
CREATE TABLE kadar_air_total(
id int(11) not null AUTO_INCREMENT,
id_sampel int,
kadar_air1 decimal(5,2),
kadar_air2 decimal(5,2),
kadar_air3 decimal(5,2),
pj_air1 varchar(100),
pj_air2 varchar(100),
pj_air3 varchar(100),
tgl_mulai_perhitungan datetime,
tgl_selsai_perhitungan datetime,
PRIMARY KEY(id)
)ENGINE=InnoDB;

-- grant SELECT, INSERT, UPDATE, DELETE ON `kadar_air_total` TO 'simlab_admin'@'localhost';

-- Table deret_fosfor
-- --  Create Table
CREATE TABLE deret_fosfor (
id int(11) not null AUTO_INCREMENT,
deret_std_p decimal(5,2),
volume_pipet_std_p decimal(5,2),
labu_ukur_std_p decimal(5,2),
std_p_100_ppm decimal(5,2),
abs decimal(5,4),
intercept decimal(5,4),
slope decimal(5,4),
c_std_p decimal(5,4),
PRIMARY KEY(id)
)ENGINE=InnoDB;

-- grant SELECT, INSERT, UPDATE, DELETE ON `deret_fosfor` TO 'simlab_admin'@'localhost';

-- Table bahan_kimia
-- --  Create Table
CREATE TABLE `bahan_kimia` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama_bahan_kimia` varchar(100) NOT NULL,
  `rumus_kimia` varchar(100) ,
  `bentuk` varchar(100),
  `spesifikasi` enum('PA', 'Teknis'),
  `merek` varchar(100),
  `volume_kemasan` varchar(50),
  `satuan_kemasan` enum('gram', 'liter'),
  `tanggal_kadaluarsa` date,
  `jenis_kemasan` varchar(100),
  `jumlah_dipakai` int,
  `jumlah_stok` int,
  `jumlah_total` int,
  `lokasi` varchar(100),
  `nomor_katalog` varchar(100),
  `lot` varchar(100),
  `keterangan` varchar(200),
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  `last_modified_user` int(11),
  `last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY(`id`)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `bahan_kimia` TO 'simlab_admin'@'localhost';


CREATE TABLE `lhu` (
  id int(11) NOT NULL AUTO_INCREMENT,
  id_sampel int NOT NULL,
  air varchar(100),
  abu varchar(100),
  protein_kasar varchar(100),
  lemak_kasar varchar(100),
  serat_kasar varchar(100),
  kalsium varchar(100),
  fosfor varchar(100),
  mulai_uji_air date,
  selesai_uji_air date,
  mulai_uji_abu date,
  selesai_uji_abu date,
  mulai_uji_protein_kasar date,
  selesai_uji_protein_kasar date,
  mulai_uji_lemak_kasar date,
  selesai_uji_lemak_kasar date,
  mulai_uji_serat_kasar date,
  selesai_uji_serat_kasar date,
  mulai_uji_kalsium date,
  selesai_uji_kalsium date,
  mulai_uji_fosfor date,
  selesai_uji_fosfor date,
  `is_active` enum('0', '1') NOT NULL DEFAULT '1',
  `last_modified_user` int(11),
  `last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY(`id`)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `lhu` TO 'simlab_admin'@'localhost';

ALTER TABLE `lhu`
  ADD CONSTRAINT `fk_lhu__id_sampel` FOREIGN KEY (`id_sampel`) REFERENCES `data_sampel` (`id`);



CREATE TABLE peralatan(
  id int(11) NOT NULL AUTO_INCREMENT,
  nama_alat varchar(100) NOT NULL,
  keterangan text,
  is_active enum('0', '1') NOT NULL DEFAULT '1',
  `last_modified_user` int(11),
  `last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY(id)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `peralatan` TO 'simlab_admin'@'localhost';


CREATE TABLE data_pad(
  id int(11) NOT NULL AUTO_INCREMENT,
  tahun varchar(4) NOT NULL,
  bulan varchar(2) NOT NULL,
  nominal varchar(30) NOT NULL,
  keterangan text,
  is_active enum('0', '1') NOT NULL DEFAULT '1',
  `last_modified_user` int(11),
  `last_modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY(id)
)ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `data_pad` TO 'simlab_admin'@'localhost';

CREATE TABLE bahan_habis_pakai (
id int(11) NOT NULL AUTO_INCREMENT,
nama_barang varchar(100) NOT NULL,
bulan int not null,
tahun int not null,
merk varchar(100),
spesifikasi varchar(100),
jumlah_stok int,
jumlah_pengambilan int,
sisa_stok int,
satuan_barang varchar(500),
is_active enum('0', '1') NOT NULL DEFAULT '1',
last_modified_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
last_modified_user int,
PRIMARY KEY(id)
) ENGINE=InnoDB;

-- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE, DELETE ON `bahan_habis_pakai` TO 'simlab_admin'@'localhost';

CREATE TABLE tdn (
id int(11) NOT NULL AUTO_INCREMENT,
id_sampel int,

bk_air varchar(10),
bk_abu varchar(10),
bk_protein_kasar varchar(10),
bk_lemak_kasar varchar(10),
bk_serat_kasar varchar(10),
bk_betn varchar(10),
bk_tdn varchar(10),

PRIMARY KEY(id)
)ENGINE=InnoDB;

 -- -- -- grant For Table
-- grant SELECT, INSERT, UPDATE ON `tdn` TO 'simlab_admin'@'localhost';

ALTER TABLE `tdn`
  ADD CONSTRAINT `fk_tdn__id_sampel` FOREIGN KEY (`id_sampel`) REFERENCES `data_sampel` (`id`);
