Compare commits

..

No commits in common. "b5f5d80057826ca52d88f8407b607140d209ff9c" and "9b17c13f44cfffe96cb48fa130df4bf9ff8f2d03" have entirely different histories.

2 changed files with 48 additions and 35 deletions

View File

@ -1,10 +1,6 @@
CREATE EXTENSION IF NOT EXISTS pgcrypto; CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- ======================================================
-- Customer/Learner Users (login via /api/v1/auth/customer-login)
-- Credentials: email + password@123
-- ======================================================
INSERT INTO users ( INSERT INTO users (
id, id,
first_name, first_name,
@ -44,9 +40,9 @@ VALUES
'Student', 'Student',
'Male', 'Male',
'2000-01-01', '2000-01-01',
'student@yimaru.com', 'student10@yimaru.com',
NULL, NULL,
'STUDENT', 'USER',
crypt('password@123', gen_salt('bf'))::bytea, crypt('password@123', gen_salt('bf'))::bytea,
'25_34', '25_34',
'Bachelor', 'Bachelor',
@ -72,25 +68,25 @@ VALUES
), ),
( (
11, 11,
'Abebe', 'System',
'Kebede', 'Admin',
'Male', 'Female',
'1995-01-01', '1995-01-01',
'abebe@yimaru.com', 'admin@yimaru.com',
'0911001100', '0911001100',
'STUDENT', 'ADMIN',
crypt('password@123', gen_salt('bf'))::bytea, crypt('password@123', gen_salt('bf'))::bytea,
'35_44', '35_44',
'Master', 'Master',
'Ethiopia', 'Ethiopia',
'Addis Ababa', 'Addis Ababa',
'INTERMEDIATE', 'ADVANCED',
'Abebe', 'SysAdmin',
'Teacher', 'Administrator',
'Improve English', 'Manage system',
'English', 'English',
'Writing', 'Writing',
'Education', 'Management',
TRUE, TRUE,
TRUE, TRUE,
TRUE, TRUE,
@ -104,25 +100,25 @@ VALUES
), ),
( (
12, 12,
'Sara', 'Support',
'Tadesse', 'Agent',
'Female', 'Female',
'1998-01-01', '1998-01-01',
'sara@yimaru.com', 'support@yimaru.com',
'0911223344', '0911223344',
'STUDENT', 'SUPPORT',
crypt('password@123', gen_salt('bf'))::bytea, crypt('password@123', gen_salt('bf'))::bytea,
'55_PLUS', '55_PLUS',
'Diploma', 'Diploma',
'Ethiopia', 'Ethiopia',
'Addis Ababa', 'Addis Ababa',
'BEGINNER', 'INTERMEDIATE',
'Sara', 'Support',
'Nurse', 'Agent',
'Learn conversational English', 'Assist users',
'English', 'English',
'Conversation', 'Conversation',
'Healthcare', 'Customer Service',
TRUE, TRUE,
TRUE, TRUE,
TRUE, TRUE,
@ -416,8 +412,7 @@ VALUES
ON CONFLICT (question_set_id, user_id) DO NOTHING; ON CONFLICT (question_set_id, user_id) DO NOTHING;
-- ====================================================== -- ======================================================
-- Team Members / Admin Panel Users (login via /api/v1/team/login) -- Team Members (Internal LMS Staff)
-- Credentials: email + password@123
-- ====================================================== -- ======================================================
INSERT INTO team_members ( INSERT INTO team_members (
@ -439,6 +434,24 @@ INSERT INTO team_members (
created_at created_at
) )
VALUES VALUES
(
1,
'Yared',
'Yemane',
'yared@yimaru.com',
'0911001100',
crypt('password@123', gen_salt('bf'))::bytea,
'SUPER_ADMIN',
'Engineering',
'CTO',
'full_time',
'2024-01-01',
'Platform super administrator with full system access.',
'active',
TRUE,
'["*"]'::jsonb,
CURRENT_TIMESTAMP
),
( (
2, 2,
'Admin', 'Admin',

View File

@ -17,14 +17,14 @@ var (
type TeamRole string type TeamRole string
const ( const (
TeamRoleSuperAdmin TeamRole = "SUPER_ADMIN" TeamRoleSuperAdmin TeamRole = "super_admin"
TeamRoleAdmin TeamRole = "ADMIN" TeamRoleAdmin TeamRole = "admin"
TeamRoleContentManager TeamRole = "CONTENT_MANAGER" TeamRoleContentManager TeamRole = "content_manager"
TeamRoleSupportAgent TeamRole = "SUPPORT_AGENT" TeamRoleSupportAgent TeamRole = "support_agent"
TeamRoleInstructor TeamRole = "INSTRUCTOR" TeamRoleInstructor TeamRole = "instructor"
TeamRoleFinance TeamRole = "FINANCE" TeamRoleFinance TeamRole = "finance"
TeamRoleHR TeamRole = "HR" TeamRoleHR TeamRole = "hr"
TeamRoleAnalyst TeamRole = "ANALYST" TeamRoleAnalyst TeamRole = "analyst"
) )
func (r TeamRole) IsValid() bool { func (r TeamRole) IsValid() bool {