11 | | {{{ |
| 11 | {{{#!sql |
| 12 | select u.email, u.username, u.full_name, u.created_at, u.type, |
| 13 | a.*, at2.name as artist_type_name, u2.full_name as manager_full_name |
| 14 | from users u |
| 15 | inner join artists a |
| 16 | on u.id = a.user_id |
| 17 | inner join artist_types at2 |
| 18 | on a.artist_type_id = at2.id |
| 19 | inner join managers m |
| 20 | on a.manager_id = m.user_id |
| 21 | inner join users u2 |
| 22 | on u2.id = m.user_id |
| 23 | where u.username = 'artist'; |
| 55 | |
| 56 | INSERT INTO project.events (title, slug, start_time, end_time, event_date, city, country, description, |
| 57 | event_type_id, organizer_id, created_at) |
| 58 | VALUES ('Igor''s Birthday', 'igors-birthday', '21:00:00', '23:30:00', '2022-09-15', 'Belgrade', 'Serbia', |
| 59 | 'It''s my birthday!', (select e.id from event_types e where e.name = 'Birthday'), ( |
| 60 | select u.id from users u |
| 61 | where u.email = 'test_organizer_1@mail.com' |
| 62 | ), NOW()); |
| 63 | |
| 64 | INSERT INTO project.offers (slug,payment_type,status,created_at,artist_id,event_id) |
| 65 | VALUES ('offer-igors-birthday-jkASHDhASD',1,1,now(),(select u.id from users u where u.email = 'test_artist@mail.com'), (select e.id from events e where e.slug = 'igors-birthday')); |