-
Notifications
You must be signed in to change notification settings - Fork 1
/
feams.sql
928 lines (776 loc) · 27.6 KB
/
feams.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 13, 2022 at 03:56 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `feams`
--
-- --------------------------------------------------------
--
-- Table structure for table `activity_log`
--
CREATE TABLE `activity_log` (
`id` int(11) NOT NULL,
`user` int(11) NOT NULL,
`description` text NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `announcements`
--
CREATE TABLE `announcements` (
`id` int(11) NOT NULL,
`title` varchar(100) NOT NULL,
`description` text NOT NULL,
`image` varchar(100) NOT NULL,
`uploader` int(11) NOT NULL,
`link` varchar(10) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `candidates`
--
CREATE TABLE `candidates` (
`id` int(11) NOT NULL,
`election_id` int(11) NOT NULL,
`position_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`photo` varchar(60) DEFAULT NULL,
`platform` text NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`thread_id` int(11) NOT NULL,
`comment` text NOT NULL,
`image` text NOT NULL,
`deleted_by` int(11) DEFAULT NULL,
`comment_date` datetime NOT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `constitutions`
--
CREATE TABLE `constitutions` (
`id` int(11) NOT NULL,
`area` varchar(150) NOT NULL,
`content` text NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `constitutions`
--
INSERT INTO `constitutions` (`id`, `area`, `content`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'PREAMBLE', '<p> We, the faculty members and employees of the Polytechnic University of the Philippines Taguig Campus, in order to enhance our role in the program and development of our society through pursuit of academic excellence, to have a dynamic commitment to nationalism and to our democratic institutions, and to support the policies and progress vital to the growth and success of the University and the advancement of the socio-economic welfare, do ordain and promulgate this Constitution and By-laws.<br></p>', '2021-10-04 10:46:11', '2021-10-04 10:46:11', NULL),
(2, 'ARTICLE I: NAME AND DOMCILE', '<p><b>Section 1.</b> The Association shall be known as the Polytechnic University of the Philippines Taguig Faculty and Employee Association (PUPTFEA).</p><p><b>Section 2.</b> The principal office of the Association shall be located at the Faculty Room 2nd floor of the Administrative Bldg.</p><div><br></div>', '2021-10-04 10:46:42', '2021-10-04 10:46:42', NULL),
(3, 'ARTICLE II: DECLARATION OF OBJECTIVES', '<p><b>Section 1.</b> The PUPTFEA shall adhere to the following objectives:</p><ol><li>To establish an association that will represent in dealing with the PUP Administration.</li><li>To promote the moral, social and economic well-being of the members.</li><li>To coordinate and cooperate in the implementation of the academic activities.</li><li>To foster the spirit of cooperation and fellowship among members.</li><li>To protect and uphold the individual and collective rights of all members as individual and of the association as a whole.</li></ol>', '2021-10-04 10:47:53', '2021-10-04 10:47:53', NULL),
(4, 'ARTICLE III: MEMBERSHIP AND DUES', '<p><b>Section 1</b>. All faculty members and administrative employees of the Polytechnic University of the Philippines Taguig Campus are automatically members of the PUPTFEA.</p><p><b>Section 2</b>. Membership fee of one hundred fifty pesos (100.00) shall be collected from a new member at the start of every semester of every school year.</p><p><b>Section 3</b>. Membership dues of one hundred fifty pesos (150.00) shall be collected from the members as fund of the association.</p><div><br></div>', '2021-10-04 10:48:21', '2021-10-04 10:48:21', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `contributions`
--
CREATE TABLE `contributions` (
`id` int(11) NOT NULL,
`name` varchar(120) NOT NULL,
`cost` double NOT NULL,
`created_by` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `elections`
--
CREATE TABLE `elections` (
`id` int(11) NOT NULL,
`title` varchar(50) NOT NULL,
`vote_start` datetime NOT NULL,
`vote_end` datetime NOT NULL,
`type` tinyint(1) NOT NULL COMMENT '1 for with party, 2 for per type of employee',
`status` enum('Application','Voting','Finished') NOT NULL DEFAULT 'Application',
`officer_set` tinyint(1) NOT NULL COMMENT 'has the officer set',
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `electoral_positions`
--
CREATE TABLE `electoral_positions` (
`id` int(11) NOT NULL,
`position_name` varchar(150) NOT NULL,
`max_candidate` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `file_sharing`
--
CREATE TABLE `file_sharing` (
`id` int(11) NOT NULL,
`file_name` varchar(150) NOT NULL,
`size` int(25) NOT NULL,
`extension` varchar(10) NOT NULL,
`uploader` int(11) NOT NULL COMMENT 'user id of the uploader',
`category` varchar(50) NOT NULL COMMENT 'file category',
`visibility` enum('for all','admin') NOT NULL COMMENT 'visibility of the file',
`downloads` int(11) NOT NULL COMMENT 'Number of downloads',
`uploaded_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `logins`
--
CREATE TABLE `logins` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
`login_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `news`
--
CREATE TABLE `news` (
`id` int(11) NOT NULL,
`title` varchar(100) NOT NULL,
`content` longtext NOT NULL,
`author` int(11) NOT NULL,
`image` varchar(100) NOT NULL,
`status` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `officers`
--
CREATE TABLE `officers` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`position` varchar(100) NOT NULL,
`election_id` int(11) NOT NULL,
`status` tinyint(1) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `password_reset_tokens`
--
CREATE TABLE `password_reset_tokens` (
`id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`email` varchar(255) NOT NULL,
`expiration_date` datetime NOT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `payments`
--
CREATE TABLE `payments` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`photo` varchar(150) NOT NULL,
`contri_id` int(11) NOT NULL,
`amount` double NOT NULL,
`added_by` int(11) NOT NULL COMMENT 'User that added the transaction',
`is_approved` tinyint(1) NOT NULL COMMENT 'Is the transaction approved',
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `payment_feedbacks`
--
CREATE TABLE `payment_feedbacks` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`subject` varchar(100) NOT NULL,
`comment` longtext NOT NULL,
`attachment` varchar(100) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `payment_methods`
--
CREATE TABLE `payment_methods` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`steps` longtext NOT NULL,
`image` text DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `payment_methods`
--
INSERT INTO `payment_methods` (`id`, `name`, `steps`, `image`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'GCash', '<ol><li>Go to GCash app on your cell phone</li><li>Tap on send money</li><li>Tap \"Express Send\"</li><li>Enter mobile number \'09123123123\'</li><li>Add 200php as the amount then tap next</li><li>Tap on send</li><li>Take a screenshot of the receipt</li><li>Return <a href=\"http://feams.csovernightstaguig.online/\" target=\"_blank\">to the site</a> and login your account</li><li>A popup should appear, and upload the receipt.</li><li>Wait for the email from the site administrator when your verification is success.</li></ol>', NULL, '2021-09-01 10:26:32', '2021-10-07 18:50:12', NULL),
(2, 'Landbank', '<p><img src=\"https://governmentph.com/wp-content/uploads/2017/10/How-to-transfer-money-using-Landbank-Mobile-App_6.png\" style=\"width: 25%;\"><br></p>', NULL, '2021-09-01 10:28:35', '2021-09-01 10:28:35', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `permissions`
--
CREATE TABLE `permissions` (
`id` int(11) NOT NULL,
`perm_mod` varchar(10) NOT NULL,
`desc` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `permissions`
--
INSERT INTO `permissions` (`id`, `perm_mod`, `desc`) VALUES
(1, 'USR', 'View Users'),
(2, 'USR', 'Delete Users'),
(3, 'USR', 'Change User Status'),
(4, 'USR', 'Change User Role'),
(5, 'ROLE', 'Add role'),
(6, 'ROLE', 'Edit role'),
(7, 'ROLE', 'Delete role'),
(8, 'ROLE', 'View roles'),
(9, 'PERM', 'View permissions'),
(10, 'PERM', 'Edit permissions'),
(11, 'ANN', 'View announcements'),
(12, 'ANN', 'Add announcements'),
(13, 'ANN', 'Edit announcements'),
(14, 'ANN', 'Delete announcements'),
(15, 'SLID', 'View sliders'),
(16, 'SLID', 'Add sliders'),
(17, 'SLID', 'Edit sliders'),
(18, 'SLID', 'Delete sliders'),
(19, 'ELEC', 'View elections'),
(20, 'ELEC', 'Add elections'),
(21, 'ELEC', 'Edit elections'),
(22, 'ELEC', 'Delete elections'),
(23, 'POS', 'View positions'),
(24, 'POS', 'Add position'),
(25, 'POS', 'Edit position'),
(26, 'POS', 'Delete position'),
(27, 'CAN', 'View candidate'),
(28, 'CAN', 'Add candidate'),
(29, 'CAN', 'Edit candidate'),
(30, 'CAN', 'Delete candidate'),
(31, 'FILES', 'View files'),
(32, 'FILES', 'Manage files'),
(33, 'FICAT', 'View file categories'),
(34, 'FICAT', 'Manage file categories'),
(35, 'DISC', 'Manage discussions'),
(36, 'COMM', 'Manage comments'),
(37, 'REPO', 'View reports'),
(38, 'USR', 'Edit Users'),
(39, 'CONT', 'Manage contributions'),
(40, 'PAY', 'Manage payments'),
(41, 'NEWS', 'View News'),
(42, 'NEWS', 'Add News'),
(43, 'NEWS', 'Edit News'),
(44, 'NEWS', 'Delete News');
-- --------------------------------------------------------
--
-- Table structure for table `positions`
--
CREATE TABLE `positions` (
`id` int(11) NOT NULL,
`election_id` int(11) NOT NULL,
`elec_position_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`id` int(11) NOT NULL,
`role_name` varchar(50) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `roles`
--
INSERT INTO `roles` (`id`, `role_name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'System Administrator', '2021-08-30 09:03:32', NULL, NULL),
(2, 'Member', '2021-08-30 09:03:32', '2022-02-23 04:41:41', NULL),
(3, 'Treasurer', '2021-09-14 15:02:44', '2021-09-14 15:02:44', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `role_permissions`
--
CREATE TABLE `role_permissions` (
`id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
`perm_mod` varchar(10) NOT NULL,
`perm_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `role_permissions`
--
INSERT INTO `role_permissions` (`id`, `role_id`, `perm_mod`, `perm_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(58, 1, 'USR', 1, '2021-09-17 09:27:45', '2021-09-17 09:27:45', NULL),
(59, 1, 'USR', 2, '2021-09-17 09:27:47', '2021-09-17 09:27:47', NULL),
(60, 1, 'USR', 3, '2021-09-17 09:27:47', '2021-09-17 09:27:47', NULL),
(61, 1, 'USR', 4, '2021-09-17 09:27:47', '2021-09-17 09:27:47', NULL),
(62, 1, 'ROLE', 5, '2021-09-17 09:27:48', '2021-09-17 09:27:48', NULL),
(63, 1, 'ROLE', 6, '2021-09-17 09:27:48', '2021-09-17 09:27:48', NULL),
(64, 1, 'ROLE', 7, '2021-09-17 09:27:48', '2021-09-17 09:27:48', NULL),
(65, 1, 'ROLE', 8, '2021-09-17 09:27:49', '2021-09-17 09:27:49', NULL),
(66, 1, 'PERM', 9, '2021-09-17 09:27:49', '2021-09-17 09:27:49', NULL),
(67, 1, 'PERM', 10, '2021-09-17 09:27:49', '2021-09-17 09:27:49', NULL),
(68, 1, 'ANN', 11, '2021-09-17 09:27:50', '2021-09-17 09:27:50', NULL),
(69, 1, 'ANN', 12, '2021-09-17 09:27:50', '2021-09-17 09:27:50', NULL),
(70, 1, 'ANN', 13, '2021-09-17 09:27:50', '2021-09-17 09:27:50', NULL),
(71, 1, 'ANN', 14, '2021-09-17 09:27:50', '2021-09-17 09:27:50', NULL),
(72, 1, 'SLID', 15, '2021-09-17 09:27:50', '2021-09-17 09:27:50', NULL),
(73, 1, 'SLID', 16, '2021-09-17 09:27:51', '2021-09-17 09:27:51', NULL),
(74, 1, 'SLID', 17, '2021-09-17 09:27:51', '2021-09-17 09:27:51', NULL),
(75, 1, 'SLID', 18, '2021-09-17 09:27:51', '2021-09-17 09:27:51', NULL),
(76, 1, 'ELEC', 19, '2021-09-17 09:27:51', '2021-09-17 09:27:51', NULL),
(77, 1, 'ELEC', 20, '2021-09-17 09:27:51', '2021-09-17 09:27:51', NULL),
(78, 1, 'ELEC', 21, '2021-09-17 09:27:52', '2021-09-17 09:27:52', NULL),
(79, 1, 'ELEC', 22, '2021-09-17 09:27:52', '2021-09-17 09:27:52', NULL),
(80, 1, 'POS', 23, '2021-09-17 09:27:52', '2021-09-17 09:27:52', NULL),
(81, 1, 'POS', 24, '2021-09-17 09:27:52', '2021-09-17 09:27:52', NULL),
(82, 1, 'POS', 25, '2021-09-17 09:27:53', '2021-09-17 09:27:53', NULL),
(83, 1, 'POS', 26, '2021-09-17 09:27:53', '2021-09-17 09:27:53', NULL),
(84, 1, 'CAN', 27, '2021-09-17 09:27:53', '2021-09-17 09:27:53', NULL),
(85, 1, 'CAN', 28, '2021-09-17 09:27:53', '2021-09-17 09:27:53', NULL),
(86, 1, 'CAN', 29, '2021-09-17 09:27:53', '2021-09-17 09:27:53', NULL),
(87, 1, 'CAN', 30, '2021-09-17 09:27:54', '2021-09-17 09:27:54', NULL),
(88, 1, 'FILES', 31, '2021-09-17 09:27:54', '2021-09-17 09:27:54', NULL),
(89, 1, 'FILES', 32, '2021-09-17 09:27:54', '2021-09-17 09:27:54', NULL),
(90, 1, 'FICAT', 33, '2021-09-17 09:27:54', '2021-09-17 09:27:54', NULL),
(91, 1, 'FICAT', 34, '2021-09-17 09:27:54', '2021-09-17 09:27:54', NULL),
(92, 1, 'DISC', 35, '2021-09-17 09:27:55', '2021-09-17 09:27:55', NULL),
(93, 1, 'COMM', 36, '2021-09-17 09:27:55', '2021-09-17 09:27:55', NULL),
(94, 1, 'REPO', 37, '2021-09-17 09:27:55', '2021-09-17 09:27:55', NULL),
(95, 1, 'USR', 38, '2021-09-17 09:27:55', '2021-09-17 09:27:55', NULL),
(96, 1, 'CONT', 39, '2021-09-17 09:27:55', '2021-09-17 09:27:55', NULL),
(97, 1, 'PAY', 40, '2021-09-17 09:27:56', '2021-09-17 09:27:56', NULL),
(98, 1, 'NEWS', 41, '2021-09-17 09:27:56', '2021-09-17 09:27:56', NULL),
(99, 1, 'NEWS', 42, '2021-09-17 09:27:56', '2021-09-17 09:27:56', NULL),
(100, 1, 'NEWS', 43, '2021-09-17 09:27:56', '2021-09-17 09:27:56', NULL),
(101, 1, 'NEWS', 44, '2021-09-17 09:27:56', '2021-09-17 09:27:56', NULL),
(109, 3, 'REPO', 37, '2021-10-08 17:04:58', '2021-10-08 17:04:58', NULL),
(110, 3, 'CONT', 39, '2021-10-08 17:04:58', '2021-10-08 17:04:58', NULL),
(111, 3, 'PAY', 40, '2021-10-08 17:04:58', '2021-10-08 17:04:58', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `sliders`
--
CREATE TABLE `sliders` (
`id` int(11) NOT NULL,
`title` varchar(50) NOT NULL,
`image` varchar(100) NOT NULL,
`description` text NOT NULL,
`uploader` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `threads`
--
CREATE TABLE `threads` (
`id` int(11) NOT NULL,
`subject` varchar(100) NOT NULL,
`creator` int(11) NOT NULL,
`visibility` int(11) NOT NULL COMMENT '0 for all and other numbers will be the role',
`link` varchar(255) NOT NULL,
`status` char(1) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`first_name` varchar(50) NOT NULL,
`middle_name` varchar(50) NOT NULL,
`last_name` varchar(50) NOT NULL,
`username` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`password` varchar(60) NOT NULL,
`email` varchar(50) NOT NULL,
`gender` varchar(6) NOT NULL,
`profile_pic` varchar(100) NOT NULL,
`payment_method` int(11) DEFAULT NULL,
`proof` varchar(100) NOT NULL,
`birthdate` date NOT NULL,
`contact_number` decimal(11,0) NOT NULL,
`email_code` varchar(10) NOT NULL,
`role` bigint(20) NOT NULL DEFAULT 0,
`type` enum('1','2','3','') NOT NULL COMMENT '1 for regular, 2 for part time, 3 for admin',
`status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0: unpaid\r\n1: active\r\n2: inactive\r\n3: paid\r\n4: pending email verification',
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `first_name`, `middle_name`, `last_name`, `username`, `password`, `email`, `gender`, `profile_pic`, `payment_method`, `proof`, `birthdate`, `contact_number`, `email_code`, `role`, `type`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'admin', '', 'admin', 'admin', '$2y$10$1xnbQsX2OX.Sp10pWrte9.hZ3BMiXrrBU6ZypOk2iDygwBf4UQqBS', 'facultyea@gmail.com', 'Male', '1645562940_922d3c41a888d55b87f4.jpg', NULL, '', '1999-11-03', '9195252973', '', 1, '1', 1, '2021-08-30 09:03:20', '2022-02-23 04:49:00', NULL),
(2, 'Treasurer', '', 'Account', 'treasurer', '$2y$10$9qpoY/6Iulx7KrwrkO40T.yVyciI4.f6lS6KDxn.JUYdh4zBA1ZNC', 'compranicles@mailinator.com', 'Female', '1646563907_f420436e5614c1d29561.png', 1, '1633626772_3f6d467334a906eebb79.jpg', '1997-07-02', '9123123123', 'guARo', 3, '1', 1, '2021-10-08 01:12:28', '2022-03-06 18:51:47', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `votes`
--
CREATE TABLE `votes` (
`id` int(11) NOT NULL,
`election_id` int(11) NOT NULL,
`voters_id` int(11) NOT NULL,
`date_casted` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `votes2`
--
CREATE TABLE `votes2` (
`id` int(11) NOT NULL,
`voter_id` int(11) NOT NULL,
`election_id` int(11) NOT NULL,
`date_casted` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `vote_details`
--
CREATE TABLE `vote_details` (
`id` int(11) NOT NULL,
`votes_id` int(11) NOT NULL,
`position_id` int(11) NOT NULL,
`candidate_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `vote_details2`
--
CREATE TABLE `vote_details2` (
`id` int(11) NOT NULL,
`votes_id` int(11) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`user_type` enum('1','2','3') DEFAULT NULL,
`position_id` int(11) DEFAULT NULL,
`candidate_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `activity_log`
--
ALTER TABLE `activity_log`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `announcements`
--
ALTER TABLE `announcements`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `candidates`
--
ALTER TABLE `candidates`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `constitutions`
--
ALTER TABLE `constitutions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `contributions`
--
ALTER TABLE `contributions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `elections`
--
ALTER TABLE `elections`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `electoral_positions`
--
ALTER TABLE `electoral_positions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `file_sharing`
--
ALTER TABLE `file_sharing`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `logins`
--
ALTER TABLE `logins`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `news`
--
ALTER TABLE `news`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `officers`
--
ALTER TABLE `officers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `payment_feedbacks`
--
ALTER TABLE `payment_feedbacks`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `payment_methods`
--
ALTER TABLE `payment_methods`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `positions`
--
ALTER TABLE `positions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `role_permissions`
--
ALTER TABLE `role_permissions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sliders`
--
ALTER TABLE `sliders`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `threads`
--
ALTER TABLE `threads`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `votes`
--
ALTER TABLE `votes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `votes2`
--
ALTER TABLE `votes2`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `vote_details`
--
ALTER TABLE `vote_details`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `vote_details2`
--
ALTER TABLE `vote_details2`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `activity_log`
--
ALTER TABLE `activity_log`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `announcements`
--
ALTER TABLE `announcements`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `candidates`
--
ALTER TABLE `candidates`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `constitutions`
--
ALTER TABLE `constitutions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `contributions`
--
ALTER TABLE `contributions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `elections`
--
ALTER TABLE `elections`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `electoral_positions`
--
ALTER TABLE `electoral_positions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `file_sharing`
--
ALTER TABLE `file_sharing`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `logins`
--
ALTER TABLE `logins`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `news`
--
ALTER TABLE `news`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `officers`
--
ALTER TABLE `officers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `payment_feedbacks`
--
ALTER TABLE `payment_feedbacks`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `payment_methods`
--
ALTER TABLE `payment_methods`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;
--
-- AUTO_INCREMENT for table `positions`
--
ALTER TABLE `positions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `role_permissions`
--
ALTER TABLE `role_permissions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=112;
--
-- AUTO_INCREMENT for table `sliders`
--
ALTER TABLE `sliders`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `threads`
--
ALTER TABLE `threads`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=41;
--
-- AUTO_INCREMENT for table `votes`
--
ALTER TABLE `votes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `votes2`
--
ALTER TABLE `votes2`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `vote_details`
--
ALTER TABLE `vote_details`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `vote_details2`
--
ALTER TABLE `vote_details2`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;