Initial secret-gift-exchange
This commit is contained in:
parent
32690e9f5d
commit
d110c64e7a
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- Add down migration script here
|
||||||
|
drop table gift_exchange;
|
||||||
|
drop table gift_exchange_participants;
|
||||||
|
|
||||||
|
delete from role_permissions where item = '/giftexchange';
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
-- Add up migration script here
|
||||||
|
CREATE TABLE
|
||||||
|
`gift_exchange` (
|
||||||
|
`id` integer not null primary key autoincrement,
|
||||||
|
`created_at` INTEGER not null default CURRENT_TIMESTAMP,
|
||||||
|
`created_by` ineger null,
|
||||||
|
`updated_at` INTEGER null default CURRENT_TIMESTAMP,
|
||||||
|
`updated_by` integer null,
|
||||||
|
`name` varchar(255) null,
|
||||||
|
`exchange_date` INTEGER null,
|
||||||
|
unique (`id`)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE
|
||||||
|
`gift_exchange_participants` (
|
||||||
|
`id` integer not null primary key autoincrement,
|
||||||
|
`created_at` INTEGER not null default CURRENT_TIMESTAMP,
|
||||||
|
`created_by` ineger null,
|
||||||
|
`updated_at` INTEGER null default CURRENT_TIMESTAMP,
|
||||||
|
`updated_by` integer null,
|
||||||
|
`exchange_id` INTEGER not null,
|
||||||
|
`participant_id` INTEGER not null,
|
||||||
|
`gifter_id` INTEGER null,
|
||||||
|
unique (`id`)
|
||||||
|
);
|
||||||
|
|
||||||
|
insert into `role_permissions` (`created_at`, `created_by`, `id`, `item`, `role_id`, `updated_at`, `updated_by`) values ('0', '0', '10', '/giftexchange', '2', '0', '0')
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
/// Select participants from user list
|
||||||
|
/// create group id for exchange
|
||||||
|
/// allow user to only see their recipient but whole list of participants
|
||||||
|
/// link to recipient wish list
|
||||||
|
/// button to create selections
|
||||||
|
///
|
||||||
|
/// Database schema
|
||||||
|
/// Table - gift_exchange
|
||||||
|
/// Columns - id -> number
|
||||||
|
/// - created_by -> number
|
||||||
|
/// - created_at -> number
|
||||||
|
/// - updated_by -> number
|
||||||
|
/// - updated_at -> number
|
||||||
|
/// - name -> text
|
||||||
|
/// - exchange_date -> number
|
||||||
|
///
|
||||||
|
/// Table - gift_exchange_participants
|
||||||
|
/// Columns - id -> number
|
||||||
|
/// - created_by -> number
|
||||||
|
/// - created_at -> number
|
||||||
|
/// - updated_by -> number
|
||||||
|
/// - updated_at -> number
|
||||||
|
/// - exchange_id -> number (reference gift_exchange table)
|
||||||
|
/// - participant_id -> number (reference user table)
|
||||||
|
/// - gifter_id -> number (reference user table)
|
||||||
|
///
|
||||||
|
/// Pages - sge_list
|
||||||
|
/// - list of gift exchanges user is part of
|
||||||
|
/// - sge_exchange
|
||||||
|
/// - exchange details
|
||||||
|
/// - list of participants
|
||||||
|
/// - sge_edit
|
||||||
|
/// - create new exchange
|
||||||
|
/// - edit existing exchange
|
||||||
|
/// - sge_participant_edit
|
||||||
|
/// - add or remove participant to exchange
|
||||||
|
///
|
||||||
|
/// API - select gifters
|
||||||
|
|
||||||
|
pub fn select_gifters() {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue