Skip to content

Commit

Permalink
✨ feat: 기본 데이터용 data.sql 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kimday0326 committed Jan 25, 2024
1 parent 4deb9d0 commit 03806d7
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
12 changes: 6 additions & 6 deletions http/test.http
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Content-Type: application/json
{
"name": "팀 스포너스",
"email": "[email protected]",
"password": "password12345",
"password": "password1234",
"location": "none",
"organizationType": "STUDENT",
"suborganizationType": "STUDENT_COUNCIL",
Expand All @@ -26,19 +26,19 @@ Content-Type: application/json

{
"email": "[email protected]",
"password": "password12345"
"password": "password1234"
}

###
### 공고 생성
POST http://localhost:8080/api/v1/announcement
Authorization: Bearer {{matsterToken}}
Content-Type: application/json

{
"title": "title",
"title": "무신사 스폰서십",
"type": "SPONSORSHIP",
"category": "IDEA",
"content": "content",
"category": "MARKETING",
"content": "무신사 스폰서십을 진행할 대학교 학생회를 모집합니다.",
"status": "POSTED"
}

Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ spring:
open-in-view: false
show-sql: true
generate-ddl: true
defer-datasource-initialization: true

sql:
init:
mode: always

jwt:
secret: EENY5W0eegTf1naQB2eDeyCLl5kRS2b8xa5c4qLdS0hmVjtbvo8tOyhPMcAmtPuQ
Expand Down
42 changes: 42 additions & 0 deletions src/main/resources/data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
INSERT INTO organization (organization_name,
organization_email,
organization_password,
organization_location,
organization_type,
suborganization_type,
manager_name,
manager_position,
manager_email,
manager_phone,
manager_available_day,
manager_available_hour,
manager_contact_preference,
organization_status)
VALUES ('팀 스포너스',
'[email protected]',
'$2a$10$tzrzG/BSFrrye7Kbm4qPYuP6jaQcj5TX5ER1.X/THqkudiSjtEmWW',
'서울특별시 강남구 테헤란로 427',
'STUDENT',
'STUDENT_COUNCIL',
'이가은',
'Project Manager',
'[email protected]',
'01012345678',
'월-금',
'09:00-18:00',
'EMAIL',
'ACTIVE');

INSERT INTO announcement (announcement_title,
announcement_type,
announcement_category,
announcement_content,
announcement_status,
view_count,
organization_id)
VALUES ('무신사 스폰서십',
'SPONSORSHIP',
'MARKETING',
'무신사 스폰서십을 진행할 대학교 학생회를 모집합니다.',
'POSTED',
0, 1);

0 comments on commit 03806d7

Please sign in to comment.