Skip to content

Commit b629ce3

Browse files
wendy2560倪诗梦
authored andcommitted
增加工作经历 (#268)
* add experience save, query, delete * add test * solve conflits * add ut * add ut --------- Co-authored-by: 倪诗梦 <mitten@geis-MacBook-Air.local>
1 parent d072af4 commit b629ce3

File tree

13 files changed

+1323
-4
lines changed

13 files changed

+1323
-4
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Copyright 2023 ecodeclub
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package domain
16+
17+
import (
18+
"time"
19+
)
20+
21+
// Experience 代表工作经历
22+
type Experience struct {
23+
// 主键
24+
Id int64
25+
// 用户的 ID
26+
Uid int64
27+
// 开始时间
28+
Start time.Time
29+
// 结束时间,如果 End 是零值,代表当前还没离职
30+
End time.Time
31+
32+
Title string // 职位
33+
CompanyName string // 公司
34+
Location string // 地点
35+
// JSON 串存起来就可以
36+
Responsibilities []Responsibility // 主要职责
37+
Accomplishments []Accomplishment // 主要成就
38+
Skills []string // 主要技能
39+
}
40+
41+
type Responsibility struct {
42+
// Type 是类型,比如说核心研发、团队管理
43+
// 用 string 来作为枚举
44+
Type string
45+
Content string
46+
}
47+
48+
type Accomplishment struct {
49+
// Type 是类型,比如说性能优化,获奖啥的
50+
Type string
51+
Content string
52+
}
53+
54+
// CurrentEmployed 是否当前正在职
55+
func (e Experience) CurrentEmployed() bool {
56+
return e.End.IsZero()
57+
}

0 commit comments

Comments
 (0)