@tabletennisshop/common 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { Model, Document } from 'mongoose';
2
2
  import { IAddress } from './address.schema';
3
3
  export interface UserAttrs {
4
+ username: string;
4
5
  email: string;
5
6
  password: string;
6
7
  full_name: string;
@@ -13,6 +14,7 @@ export interface UserAttrs {
13
14
  status: string;
14
15
  }
15
16
  interface UserDoc extends Document {
17
+ username: string;
16
18
  email: string;
17
19
  password: string;
18
20
  full_name: string;
@@ -15,6 +15,7 @@ const password_1 = require("../services/password");
15
15
  const user_enum_1 = require("../enums/user.enum");
16
16
  const address_schema_1 = require("./address.schema");
17
17
  const UserSchema = new mongoose_1.Schema({
18
+ username: { type: String, required: true, unique: true, minlength: 5 },
18
19
  email: { type: String, required: true, unique: true },
19
20
  password: { type: String, required: true, minlength: 4 },
20
21
  full_name: { type: String, required: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tabletennisshop/common",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "build/index.d.ts",