Compare commits
No commits in common. "main" and "v1.0.0" have entirely different histories.
|
@ -1,9 +0,0 @@
|
|||
# Usage
|
||||
|
||||
You can use this library by executing the following command and specifying the version you want to use:
|
||||
|
||||
```bash
|
||||
go get git.ex.umbach.dev/LMS/libcore@v1.0.0
|
||||
```
|
||||
|
||||
You can see the latest version of the library on the [tags page](https://git.ex.umbach.dev/LMS/libcore/tags)
|
|
@ -1,25 +0,0 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Lesson struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
OrganizationId string `gorm:"type:varchar(36)"`
|
||||
State uint8 `gorm:"type:tinyint(1)"`
|
||||
Title string `gorm:"type:varchar(255)"`
|
||||
ThumbnailUrl string `gorm:"type:varchar(255)"`
|
||||
CreatorUserId string `gorm:"type:varchar(36)"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type LessonContent struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
LessonId string `gorm:"type:varchar(36)"`
|
||||
Page uint16 `gorm:"type:smallint(5)"` // Page number
|
||||
Position uint16 `gorm:"type:smallint(5)"` // Position on the page
|
||||
Type uint8 // Type of content, like text, image, video, etc
|
||||
Data string `gorm:"type:text"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Organization struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
Subdomain string `gorm:"type:varchar(255)"`
|
||||
OwnerUserId string `gorm:"type:varchar(36)"`
|
||||
CompanyName string `gorm:"type:varchar(255)"`
|
||||
PrimaryColor string `gorm:"type:varchar(6)"`
|
||||
LogoUrl string `gorm:"type:varchar(255)"`
|
||||
BannerUrl string `gorm:"type:varchar(255)"`
|
||||
SignUpScreenUrl string `gorm:"type:varchar(255)"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Question struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
LessonId string `gorm:"type:varchar(36)"`
|
||||
QuestionId string `gorm:"type:varchar(36)"`
|
||||
ReplyId string `gorm:"type:varchar(36)"`
|
||||
Message string `gorm:"type:text"`
|
||||
Likes uint16 `gorm:"type:smallint(5)"`
|
||||
CreatorUserId string `gorm:"type:varchar(36)"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type QuestionLike struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
QuestionId string `gorm:"type:varchar(36)"`
|
||||
CreatorUserId string `gorm:"type:varchar(36)"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Role struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
OrganizationId string `gorm:"type:varchar(36)"`
|
||||
Master bool `gorm:"type:tinyint(1)"`
|
||||
Name string `gorm:"type:varchar(255)"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type RolePermission struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
RoleId string `gorm:"type:varchar(36)"`
|
||||
Permission uint16 `gorm:"type:smallint"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
OrganizationId string `gorm:"type:varchar(36)"`
|
||||
State uint8 `gorm:"type:tinyint(1)"`
|
||||
Disabled bool `gorm:"type:tinyint(1)"`
|
||||
RoleId string `gorm:"type:varchar(36)"`
|
||||
FirstName string `gorm:"type:varchar(255)"`
|
||||
LastName string `gorm:"type:varchar(255)"`
|
||||
Email string `gorm:"type:varchar(255)"`
|
||||
Password string `gorm:"type:varchar(255)"`
|
||||
ProfilePictureUrl string `gorm:"type:varchar(255)"`
|
||||
LastOnlineAt time.Time
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type UserSession struct {
|
||||
Id string `gorm:"primaryKey;type:varchar(36)"`
|
||||
UserId string `gorm:"type:varchar(36)"`
|
||||
OrganizationId string `gorm:"type:varchar(36)"`
|
||||
Session string `gorm:"type:varchar(36)"`
|
||||
UserAgent string `gorm:"type:varchar(255)"`
|
||||
ExpiresAt time.Time
|
||||
LastUsedAt time.Time
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
Loading…
Reference in New Issue