Skip to content

Commit

Permalink
start addind user
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Jul 25, 2024
1 parent d09fc03 commit c61c5f1
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/JiraPharoAPI-Model-Generator/JPMetamodelGenerator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Class {
'issue',
'issueType',
'project',
'worklog'
'worklog',
'user'
],
#category : #'JiraPharoAPI-Model-Generator'
}
Expand All @@ -32,7 +33,8 @@ JPMetamodelGenerator >> defineClasses [
issue := builder newClassNamed: 'Issue'.
issueType := builder newClassNamed: 'IssueType'.
project := builder newClassNamed: 'Project'.
worklog := builder newClassNamed: 'Worklog'
worklog := builder newClassNamed: 'Worklog'.
user := builder newClassNamed: 'User'.
]

{ #category : #definition }
Expand Down Expand Up @@ -75,7 +77,13 @@ JPMetamodelGenerator >> defineProperties [
worklog property: #id type: #Number.
worklog property: #author type: #Object.
worklog property: #updateAuthor type: #Object.
worklog withEqualityCheckOn: { #id }
worklog withEqualityCheckOn: { #id }.

user property: #accountId type: #String.
user property: #displayName type: #String.
user property: #emailAddress type: #String.
user property: #name type: #String.
user property: #accountType type: #String
]

{ #category : #definition }
Expand Down
7 changes: 7 additions & 0 deletions src/JiraPharoAPI-Model/JPTEntityCreator.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ JPTEntityCreator >> newProject [
^ self add: JPProject new
]

{ #category : #'entity creation' }
JPTEntityCreator >> newUser [

<generated>
^ self add: JPUser new
]

{ #category : #'entity creation' }
JPTEntityCreator >> newWorklog [

Expand Down
104 changes: 104 additions & 0 deletions src/JiraPharoAPI-Model/JPUser.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
"
## Properties
======================
| Name | Type | Default value | Comment |
|---|
| `accountId` | `String` | nil | |
| `accountType` | `String` | nil | |
| `displayName` | `String` | nil | |
| `emailAddress` | `String` | nil | |
| `name` | `String` | nil | |
"
Class {
#name : #JPUser,
#superclass : #JPEntity,
#instVars : [
'#accountId => FMProperty',
'#displayName => FMProperty',
'#emailAddress => FMProperty',
'#name => FMProperty',
'#accountType => FMProperty'
],
#category : #'JiraPharoAPI-Model-Entities'
}

{ #category : #meta }
JPUser class >> annotation [

<FMClass: #User super: #JPEntity>
<package: #'JiraPharoAPI-Model'>
<generated>
^ self
]

{ #category : #accessing }
JPUser >> accountId [

<FMProperty: #accountId type: #String>
<generated>
^ accountId
]

{ #category : #accessing }
JPUser >> accountId: anObject [
<generated>
accountId := anObject
]

{ #category : #accessing }
JPUser >> accountType [

<FMProperty: #accountType type: #String>
<generated>
^ accountType
]

{ #category : #accessing }
JPUser >> accountType: anObject [
<generated>
accountType := anObject
]

{ #category : #accessing }
JPUser >> displayName [

<FMProperty: #displayName type: #String>
<generated>
^ displayName
]

{ #category : #accessing }
JPUser >> displayName: anObject [
<generated>
displayName := anObject
]

{ #category : #accessing }
JPUser >> emailAddress [

<FMProperty: #emailAddress type: #String>
<generated>
^ emailAddress
]

{ #category : #accessing }
JPUser >> emailAddress: anObject [
<generated>
emailAddress := anObject
]

{ #category : #accessing }
JPUser >> name [

<FMProperty: #name type: #String>
<generated>
^ name
]

{ #category : #accessing }
JPUser >> name: anObject [
<generated>
name := anObject
]

0 comments on commit c61c5f1

Please sign in to comment.