create-nexgen 1.0.4
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.
- package/package.json +26 -0
- package/src/index.js +108 -0
- package/template/.dockerignore +14 -0
- package/template/.env +58 -0
- package/template/.env.example +59 -0
- package/template/.prettierignore +5 -0
- package/template/.prettierrc +8 -0
- package/template/README.md +447 -0
- package/template/drizzle.config.ts +29 -0
- package/template/eslint.config.js +52 -0
- package/template/gitignore-stub +24 -0
- package/template/package.json +96 -0
- package/template/public/assets/AuthLayout-CbswhpjJ.js +1 -0
- package/template/public/assets/Button-_7aQ7gHL.js +1 -0
- package/template/public/assets/Input-CLNJXmKc.css +1 -0
- package/template/public/assets/Input-z8GI8Aqo.js +1 -0
- package/template/public/assets/InputPasswordToggle-BxlzVGp3.js +1 -0
- package/template/public/assets/InputPasswordToggle-C77FI9Eg.css +1 -0
- package/template/public/assets/Layout-DotR1sQC.js +1 -0
- package/template/public/assets/Refresh-BdqsPPBC.js +1 -0
- package/template/public/assets/admin-ui-CU34rLdN.js +1 -0
- package/template/public/assets/bootstrap-icons-BeopsB42.woff +0 -0
- package/template/public/assets/bootstrap-icons-mSm7cUeB.woff2 +0 -0
- package/template/public/assets/dashboard-CwybEyLc.js +1 -0
- package/template/public/assets/dashboard-Dc4d-Pi7.css +1 -0
- package/template/public/assets/forgetPassword-CKEJaXsq.js +1 -0
- package/template/public/assets/index-Bleyx5dm.js +64 -0
- package/template/public/assets/index-DUw8E6Yg.css +1 -0
- package/template/public/assets/login-DC7PTlQF.js +1 -0
- package/template/public/assets/realtime-test-BPQdrFym.css +1 -0
- package/template/public/assets/realtime-test-tQZ0rBEJ.js +1 -0
- package/template/public/assets/register-3O7Qs28C.js +1 -0
- package/template/public/assets/resetPassword-A5AzMWKs.js +1 -0
- package/template/public/assets/verifyEmail-DDBEQHOv.js +1 -0
- package/template/public/index.html +17 -0
- package/template/src/database/migrations/mysql/0000_init.sql +73 -0
- package/template/src/database/migrations/mysql/meta/0000_snapshot.json +484 -0
- package/template/src/database/migrations/mysql/meta/_journal.json +13 -0
- package/template/src/database/schema.ts +4 -0
- package/template/src/env.ts +107 -0
- package/template/src/framework/cache/cache.ts +81 -0
- package/template/src/framework/database/connection.ts +168 -0
- package/template/src/framework/database/optional-db-drivers.d.ts +9 -0
- package/template/src/framework/database/paginate.ts +200 -0
- package/template/src/framework/database/schema.ts +26 -0
- package/template/src/framework/database/seed.ts +33 -0
- package/template/src/framework/events/dispatcher.ts +57 -0
- package/template/src/framework/facade.ts +27 -0
- package/template/src/framework/http/app.ts +61 -0
- package/template/src/framework/http/cors.ts +19 -0
- package/template/src/framework/http/logger.ts +85 -0
- package/template/src/framework/http/openapi.ts +34 -0
- package/template/src/framework/http/ratelimiter.ts +13 -0
- package/template/src/framework/http/router.ts +76 -0
- package/template/src/framework/http/static.ts +33 -0
- package/template/src/framework/http/validation.ts +24 -0
- package/template/src/framework/kernel.ts +40 -0
- package/template/src/framework/maker-cli/src/index.mjs +51 -0
- package/template/src/framework/maker-cli/src/levels/level-1/env-db.mjs +57 -0
- package/template/src/framework/maker-cli/src/levels/level-1/file-ops.mjs +30 -0
- package/template/src/framework/maker-cli/src/levels/level-1/flags.mjs +16 -0
- package/template/src/framework/maker-cli/src/levels/level-1/help.mjs +24 -0
- package/template/src/framework/maker-cli/src/levels/level-1/naming.mjs +13 -0
- package/template/src/framework/maker-cli/src/levels/level-1/process.mjs +47 -0
- package/template/src/framework/maker-cli/src/levels/level-2/db/core.mjs +299 -0
- package/template/src/framework/maker-cli/src/levels/level-2/db/index.mjs +177 -0
- package/template/src/framework/maker-cli/src/levels/level-2/deploy/core.mjs +635 -0
- package/template/src/framework/maker-cli/src/levels/level-2/deploy/index.mjs +145 -0
- package/template/src/framework/maker-cli/src/levels/level-2/module/core.mjs +707 -0
- package/template/src/framework/maker-cli/src/levels/level-2/module/index.mjs +116 -0
- package/template/src/framework/maker-cli/src/levels/level-2/runtime/build-frontend.mjs +16 -0
- package/template/src/framework/maker-cli/src/levels/level-2/runtime/core.mjs +311 -0
- package/template/src/framework/maker-cli/src/levels/level-2/runtime/index.mjs +71 -0
- package/template/src/framework/maker-cli/stubs/controller/openapi.ts.stub +55 -0
- package/template/src/framework/maker-cli/stubs/controller/openapi.with-model.ts.stub +56 -0
- package/template/src/framework/maker-cli/stubs/controller/plain.ts.stub +57 -0
- package/template/src/framework/maker-cli/stubs/controller/schema.plain.ts.stub +13 -0
- package/template/src/framework/maker-cli/stubs/controller/schema.ts.stub +32 -0
- package/template/src/framework/maker-cli/stubs/deploy/Dockerfile.bun.stub +49 -0
- package/template/src/framework/maker-cli/stubs/deploy/Dockerfile.pnpm.stub +53 -0
- package/template/src/framework/maker-cli/stubs/deploy/Dockerfile.stub +49 -0
- package/template/src/framework/maker-cli/stubs/deploy/Dockerfile.yarn.stub +53 -0
- package/template/src/framework/maker-cli/stubs/deploy/README.stub +55 -0
- package/template/src/framework/maker-cli/stubs/deploy/compose/mysql.server.stub +29 -0
- package/template/src/framework/maker-cli/stubs/deploy/compose/postgres.server.stub +29 -0
- package/template/src/framework/maker-cli/stubs/deploy/compose/sqlite.stub +29 -0
- package/template/src/framework/maker-cli/stubs/deploy/env/mysql.server.stub +73 -0
- package/template/src/framework/maker-cli/stubs/deploy/env/postgres.server.stub +73 -0
- package/template/src/framework/maker-cli/stubs/deploy/env/sqlite.stub +72 -0
- package/template/src/framework/maker-cli/stubs/deploy/scripts/auto-migrate.sh.stub +15 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/README.stub +77 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/compose/noredis.stub +118 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/compose/redis.dev.stub +131 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/compose/redis.stub +129 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/env/local.example.stub +10 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/env/noredis.stub +24 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/env/redis.stub +24 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/nginx-vhost/README.stub +15 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/nginx-vhost/app.example.com.stub +12 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/pgadmin/servers.stub +13 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/redis/redis.conf.stub +6 -0
- package/template/src/framework/maker-cli/stubs/deploy/supervisor/noredis.stub +53 -0
- package/template/src/framework/maker-cli/stubs/deploy/supervisor/redis.stub +69 -0
- package/template/src/framework/maker-cli/stubs/deploy/workflow/local.json.stub +24 -0
- package/template/src/framework/maker-cli/stubs/deploy/workflow/remote.json.stub +20 -0
- package/template/src/framework/maker-cli/stubs/example/console.ts.stub +33 -0
- package/template/src/framework/maker-cli/stubs/example/controller.ts.stub +503 -0
- package/template/src/framework/maker-cli/stubs/example/job.ts.stub +74 -0
- package/template/src/framework/maker-cli/stubs/example/route.api.ts.stub +206 -0
- package/template/src/framework/maker-cli/stubs/example/schema.ts.stub +41 -0
- package/template/src/framework/maker-cli/stubs/job/name.ts.stub +24 -0
- package/template/src/framework/maker-cli/stubs/model/name.mysql.ts.stub +8 -0
- package/template/src/framework/maker-cli/stubs/model/name.postgresql.ts.stub +8 -0
- package/template/src/framework/maker-cli/stubs/model/name.sqlite.ts.stub +8 -0
- package/template/src/framework/maker-cli/stubs/notification/NotificationBell.vue.stub +218 -0
- package/template/src/framework/maker-cli/stubs/notification/controller.ts.stub +85 -0
- package/template/src/framework/maker-cli/stubs/notification/index.vue.stub +211 -0
- package/template/src/framework/maker-cli/stubs/notification/job.ts.stub +12 -0
- package/template/src/framework/maker-cli/stubs/notification/route.api.ts.stub +49 -0
- package/template/src/framework/maker-cli/stubs/notification/schema.ts.stub +25 -0
- package/template/src/framework/maker-cli/stubs/route/api.ts.stub +79 -0
- package/template/src/framework/maker-cli/stubs/route/plain.ts.stub +10 -0
- package/template/src/framework/maker-cli/stubs/schedule/name.ts.stub +35 -0
- package/template/src/framework/maker-cli/stubs/seeder/name.ts.stub +17 -0
- package/template/src/framework/modules/discover.ts +54 -0
- package/template/src/framework/modules/routes.ts +26 -0
- package/template/src/framework/notification/index.ts +109 -0
- package/template/src/framework/queue/clear.ts +20 -0
- package/template/src/framework/queue/queue.ts +213 -0
- package/template/src/framework/queue/ui.ts +104 -0
- package/template/src/framework/queue/worker.ts +33 -0
- package/template/src/framework/realtime/broadcast.ts +27 -0
- package/template/src/framework/realtime/index.ts +1 -0
- package/template/src/framework/realtime/socket-cookie.ts +65 -0
- package/template/src/framework/realtime/socket.ts +132 -0
- package/template/src/framework/realtime/types.ts +6 -0
- package/template/src/framework/realtime/ui.ts +16 -0
- package/template/src/framework/redis/client.ts +126 -0
- package/template/src/framework/scheduler/lock.ts +124 -0
- package/template/src/framework/scheduler/run.ts +26 -0
- package/template/src/framework/scheduler/scheduler.ts +82 -0
- package/template/src/framework/server.ts +147 -0
- package/template/src/framework/session/session.ts +116 -0
- package/template/src/framework/storage/storage.ts +743 -0
- package/template/src/framework/support/cookie.ts +78 -0
- package/template/src/framework/support/jwt.ts +45 -0
- package/template/src/framework/support/lifecycle.ts +35 -0
- package/template/src/framework/support/logger.ts +102 -0
- package/template/src/framework/support/mail.ts +43 -0
- package/template/src/framework/support/password.ts +23 -0
- package/template/src/framework/support/url.ts +25 -0
- package/template/src/middlewares/auth-middleware.ts +98 -0
- package/template/src/middlewares/role-middleware.ts +24 -0
- package/template/src/modules/auth/controllers/auth.controller.ts +445 -0
- package/template/src/modules/auth/controllers/auth.helpers.ts +110 -0
- package/template/src/modules/auth/controllers/auth.schema.ts +102 -0
- package/template/src/modules/auth/controllers/role.controller.ts +25 -0
- package/template/src/modules/auth/database/models/notifications.ts +22 -0
- package/template/src/modules/auth/database/models/role.ts +14 -0
- package/template/src/modules/auth/database/models/user.ts +46 -0
- package/template/src/modules/auth/database/seeders/role.ts +19 -0
- package/template/src/modules/auth/database/seeders/user.ts +33 -0
- package/template/src/modules/auth/jobs/forgetpass.ts +18 -0
- package/template/src/modules/auth/jobs/registeruser.ts +31 -0
- package/template/src/modules/auth/jobs/verifyemail.ts +18 -0
- package/template/src/modules/auth/routes/api.ts +151 -0
- package/template/src/modules/auth/routes/role.ts +39 -0
- package/template/src/modules/welcome/controllers/welcome.controller.ts +14 -0
- package/template/src/modules/welcome/controllers/welcome.schema.ts +6 -0
- package/template/src/modules/welcome/database/models/welcome.ts +6 -0
- package/template/src/modules/welcome/routes/api.ts +20 -0
- package/template/src/resources/index.html +16 -0
- package/template/src/resources/src/App.vue +5 -0
- package/template/src/resources/src/assets/css/styles.css +14934 -0
- package/template/src/resources/src/assets/css/styles.css.map +1 -0
- package/template/src/resources/src/assets/images/favicon/favicon.ico +0 -0
- package/template/src/resources/src/assets/images/favicon/favicon1.ico +0 -0
- package/template/src/resources/src/assets/images/logo-1.png +0 -0
- package/template/src/resources/src/assets/images/logo-dark-sm.png +0 -0
- package/template/src/resources/src/assets/images/logo-dark.png +0 -0
- package/template/src/resources/src/assets/images/logo-dark1.png +0 -0
- package/template/src/resources/src/assets/images/logo-sm.png +0 -0
- package/template/src/resources/src/assets/images/logo1.png +0 -0
- package/template/src/resources/src/assets/images/logo2.png +0 -0
- package/template/src/resources/src/assets/scss/custom.css +217 -0
- package/template/src/resources/src/assets/scss/custom.css.map +1 -0
- package/template/src/resources/src/assets/scss/custom.scss +1100 -0
- package/template/src/resources/src/components/Button.vue +35 -0
- package/template/src/resources/src/components/Checkbox.vue +29 -0
- package/template/src/resources/src/components/FloatButton.vue +36 -0
- package/template/src/resources/src/components/Href.vue +32 -0
- package/template/src/resources/src/components/Input.vue +227 -0
- package/template/src/resources/src/components/InputGroup.vue +153 -0
- package/template/src/resources/src/components/InputPasswordToggle.vue +226 -0
- package/template/src/resources/src/components/Modal.vue +102 -0
- package/template/src/resources/src/components/Pagebar.vue +28 -0
- package/template/src/resources/src/components/Refresh.vue +26 -0
- package/template/src/resources/src/components/Select.vue +390 -0
- package/template/src/resources/src/components/Spinner.vue +42 -0
- package/template/src/resources/src/components/Switch.vue +65 -0
- package/template/src/resources/src/components/TextArea.vue +121 -0
- package/template/src/resources/src/components/Toast.vue +56 -0
- package/template/src/resources/src/components/datatable/DataTableSkeleton.vue +99 -0
- package/template/src/resources/src/components/datatable/Pagination.vue +161 -0
- package/template/src/resources/src/components/datatable/SelectOpption.vue +54 -0
- package/template/src/resources/src/components/datatable/index.vue +237 -0
- package/template/src/resources/src/composables/useAuth.ts +52 -0
- package/template/src/resources/src/composables/useBrowserDetect.ts +5 -0
- package/template/src/resources/src/composables/useDialog.ts +5 -0
- package/template/src/resources/src/composables/useGum.ts +3 -0
- package/template/src/resources/src/composables/usePulse.ts +5 -0
- package/template/src/resources/src/env.d.ts +20 -0
- package/template/src/resources/src/helpers/nformatter.ts +10 -0
- package/template/src/resources/src/helpers/utils.ts +68 -0
- package/template/src/resources/src/layouts/AuthLayout.vue +20 -0
- package/template/src/resources/src/layouts/Layout/Footer.vue +23 -0
- package/template/src/resources/src/layouts/Layout/Header.vue +90 -0
- package/template/src/resources/src/layouts/Layout/Sidebar.vue +137 -0
- package/template/src/resources/src/layouts/Layout/index.vue +76 -0
- package/template/src/resources/src/main.ts +27 -0
- package/template/src/resources/src/pages/auth/forgetPassword.vue +76 -0
- package/template/src/resources/src/pages/auth/login.vue +93 -0
- package/template/src/resources/src/pages/auth/register.vue +130 -0
- package/template/src/resources/src/pages/auth/resetPassword.vue +119 -0
- package/template/src/resources/src/pages/auth/verifyEmail.vue +60 -0
- package/template/src/resources/src/pages/dashboard/index.vue +76 -0
- package/template/src/resources/src/plugins/axios.ts +33 -0
- package/template/src/resources/src/plugins/browserDetect.ts +55 -0
- package/template/src/resources/src/plugins/dialog.ts +167 -0
- package/template/src/resources/src/plugins/gum.ts +343 -0
- package/template/src/resources/src/plugins/pulse.ts +141 -0
- package/template/src/resources/src/plugins/routeProgress.ts +87 -0
- package/template/src/resources/src/router/index.ts +85 -0
- package/template/src/resources/src/stores/admin-ui.ts +148 -0
- package/template/src/resources/src/stores/auth.ts +151 -0
- package/template/src/resources/tsconfig.json +19 -0
- package/template/src/resources/vite.config.ts +43 -0
- package/template/src/storage/logs/app.log +20179 -0
- package/template/src/storage/logs/fatal.log +727 -0
- package/template/tsconfig.json +20 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,F as r,H as i,L as a,N as o,R as s,S as c,T as l,U as u,V as d,c as f,d as p,f as m,g as h,o as g,t as _,v,w as y,x as b,y as x,z as S}from"./index-Bleyx5dm.js";import{t as C}from"./Input-z8GI8Aqo.js";import{t as w}from"./InputPasswordToggle-BxlzVGp3.js";var T=[`id`],E=[`for`],D=n({name:`Checkbox`,inheritAttrs:!1,__name:`Checkbox`,props:y({id:{},label:{},topclass:{}},{modelValue:{type:[Boolean,Array],default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let n=t,a=r(t,`modelValue`);return(t,r)=>(e(),x(`div`,{class:i([`form-check mb-0`,n.topclass])},[s(h(`input`,l({id:n.id,"onUpdate:modelValue":r[0]||=e=>a.value=e,class:`form-check-input shadow-none border-secondary`,type:`checkbox`},t.$attrs),null,16,T),[[p,a.value]]),n.label?(e(),x(`label`,{key:0,class:`form-check-label`,for:n.id},u(n.label),9,E)):v(``,!0)],2))}}),O={class:`container position-absolute start-50 top-50 translate-middle`},k={class:`auth col-12 col-sm-9 col-md-7 col-lg-5 col-xl-4 mx-auto py-5`},A={class:`card card-body border-0`},j={key:0,class:`text-center alert alert-danger text-danger py-1 mt-2`},M={class:`mb-4`},N={class:`mb-4`},P={class:`mb-4 d-flex align-items-center justify-content-between`},F=[`disabled`],I={class:`text-center mt-3`},L=n({__name:`login`,setup(n){f({title:`Login`});let r=g(),i=_(),s=t(``),l=S({email:``,password:``,remember:!1}),p=async()=>{s.value=``;try{await i.login({email:l.email.trim(),password:l.password,remember:l.remember}),await r.push(`/`)}catch(e){s.value=e instanceof Error?e.message:`Unable to login right now`}};return(t,n)=>{let r=o(`router-link`);return e(),x(`div`,O,[h(`div`,k,[h(`div`,A,[n[7]||=h(`div`,{class:`d-block mb-2`},[h(`h3`,{class:`m-0 text-uppercase text-center fw-semibold`},`nexgen`)],-1),s.value?(e(),x(`p`,j,u(s.value),1)):v(``,!0),h(`form`,{onSubmit:m(p,[`prevent`])},[h(`div`,M,[c(C,{id:`email`,modelValue:l.email,"onUpdate:modelValue":n[0]||=e=>l.email=e,type:`email`,label:`email`,placeholder:`Enter your email...`,err:!1,focus:``,must:``},null,8,[`modelValue`])]),h(`div`,N,[c(w,{id:`password`,modelValue:l.password,"onUpdate:modelValue":n[1]||=e=>l.password=e,label:`password`,placeholder:`Enter your password...`,err:!1,must:``},null,8,[`modelValue`])]),h(`div`,P,[c(D,{id:`remember-me`,modelValue:l.remember,"onUpdate:modelValue":n[2]||=e=>l.remember=e,label:`Remember me`},null,8,[`modelValue`]),c(r,{to:`/forget-password`,class:`text-decoration-none mb-1`},{default:a(()=>[...n[3]||=[b(`Forget Password?`,-1)]]),_:1})]),h(`button`,{type:`submit`,class:`btn btn-primary w-100`,disabled:d(i).processing},[...n[4]||=[h(`span`,null,`Login`,-1),h(`i`,{class:`bi bi-box-arrow-in-right ms-2`},null,-1)]],8,F),h(`div`,I,[n[6]||=h(`span`,{class:`text-muted`},`Don't have an account?`,-1),c(r,{to:`/register`,class:`ms-1 text-decoration-none`},{default:a(()=>[...n[5]||=[b(`Register`,-1)]]),_:1})])],32)])])])}}});export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.realtime-test[data-v-b8a29e71]{padding:.5rem}.status-row[data-v-b8a29e71]{align-items:center;gap:.5rem;padding:.4rem 0;font-size:.95rem;display:flex}.socket-status[data-v-b8a29e71]{align-items:center;gap:.5rem;font-weight:500;display:flex}.socket-dot[data-v-b8a29e71]{background:#ffc107;border-radius:50%;width:10px;height:10px}.socket-dot.connected[data-v-b8a29e71]{background:#198754}.event-log[data-v-b8a29e71]{max-height:500px;overflow-y:auto}.event-entry[data-v-b8a29e71]{border-bottom:1px solid var(--app-border);padding:.75rem 1rem}.event-entry[data-v-b8a29e71]:last-child{border-bottom:none}.event-header[data-v-b8a29e71]{align-items:center;gap:.5rem;margin-bottom:.25rem;display:flex}.event-badge[data-v-b8a29e71]{text-transform:uppercase;border-radius:.25rem;padding:.15rem .4rem;font-size:.7rem;font-weight:600}.event-badge.all[data-v-b8a29e71]{color:#fff;background:#0d6efd}.event-badge.auth[data-v-b8a29e71]{color:#fff;background:#0dcaf0}.event-badge.role[data-v-b8a29e71]{color:#000;background:#ffc107}.event-badge.user[data-v-b8a29e71]{color:#fff;background:#6c757d}.event-badge.queue[data-v-b8a29e71]{color:#fff;background:#198754}.event-badge.recv[data-v-b8a29e71]{color:#fff;background:#6610f2}.event-badge.error[data-v-b8a29e71]{color:#fff;background:#dc3545}.event-badge.notif[data-v-b8a29e71]{color:#fff;background:#0d6efd}.event-name[data-v-b8a29e71]{flex:1;font-size:.85rem;font-weight:500}.event-time[data-v-b8a29e71]{color:var(--bs-secondary-color);font-size:.75rem}.event-payload[data-v-b8a29e71]{background:var(--app-surface);white-space:pre-wrap;word-break:break-all;border-radius:.25rem;max-height:120px;margin:0;padding:.5rem;font-size:.8rem;overflow-y:auto}@media (width<=768px){.realtime-test[data-v-b8a29e71]{padding:0}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,E as ee,H as r,O as i,S as a,U as o,W as s,c,g as l,i as u,j as te,k as d,p as f,r as p,s as m,v as ne,x as h,y as g,z as re}from"./index-Bleyx5dm.js";import{n as ie,t as ae}from"./Refresh-BdqsPPBC.js";var oe={class:`realtime-test`},_={class:`row g-3`},v={class:`col-12 col-lg-4`},y={class:`card`},b={class:`card-body`},x={class:`card mt-3`},S={class:`card-body d-flex flex-column gap-2`},C=[`disabled`],w=[`disabled`],T=[`disabled`],E=[`disabled`],D=[`disabled`],O={class:`card mt-3`},k={class:`card-body d-flex flex-column gap-2`},A=[`disabled`],j=[`disabled`],M=[`disabled`],se=[`disabled`],N={class:`col-12 col-lg-8`},P={class:`card`},F={class:`card-header d-flex align-items-center justify-content-between`},I={class:`d-flex align-items-center gap-2`},L={class:`badge bg-secondary`},R={class:`card-body p-0`},z={key:0,class:`text-center text-secondary p-4`},B={class:`event-header`},V={class:`event-name`},H={class:`event-time`},U={class:`event-payload`},W=u(n({__name:`index`,setup(n){c({title:`Realtime Test`});let{user:u}=p(),W=re({socketIo:!1,redis:!1,redisAdapter:!1}),G=t(!1),K=t(!1),q=t([]),J=t(null);function Y(e,t,n){q.value.push({mode:e,event:t,time:new Date().toLocaleTimeString(),payload:JSON.stringify(n,null,2)}),ee(()=>{J.value&&(J.value.scrollTop=J.value.scrollHeight)})}async function X(){try{let e=await s.get(`/api/realtime-test/status`);Object.assign(W,e.data)}catch{W.socketIo=!1,W.redis=!1,W.redisAdapter=!1}}async function Z(e){K.value=!0;try{await s.post(`/api/realtime-test/notify/${e}`,{message:`Notification test (${e}) at ${new Date().toLocaleTimeString()}`}),Y(`notif`,`notification/${e}`,{message:`${e} notification sent`})}catch{Y(`notif`,`error`,{message:`Notification ${e} failed`})}finally{K.value=!1}}async function Q(e){K.value=!0;try{await s.post(`/api/realtime-test/broadcast/${e}`,{message:`Test at ${new Date().toLocaleTimeString()}`,userId:u.value?.id})}catch{Y(e,`error`,{message:`Request failed`})}finally{K.value=!1}}let $=[];return i(async()=>{if(await X(),m.connect().channel(`test`).listen(`realtime-test.event`,e=>{Y(`recv`,`realtime-test.event`,e)}),G.value=!0,u.value){let e=m.channel(`user:${u.value.id}`);e.listen(`realtime-test.event`,e=>{Y(`user`,`realtime-test.event`,e)}),$.push(()=>e.stopListening(`realtime-test.event`))}}),d(()=>{$.forEach(e=>e())}),(t,n)=>(e(),g(f,null,[a(ie,{title:`Realtime Test`}),a(ae,{onClick:X}),l(`div`,oe,[l(`div`,_,[l(`div`,v,[l(`div`,y,[n[11]||=l(`div`,{class:`card-header d-flex align-items-center gap-2`},[l(`i`,{class:`bi bi-info-circle`}),l(`span`,{class:`fw-semibold`},`Connection Status`)],-1),l(`div`,b,[l(`div`,{class:r([`status-row`,W.socketIo?`text-success`:`text-danger`])},[l(`i`,{class:r(W.socketIo?`bi bi-check-circle-fill`:`bi bi-x-circle-fill`)},null,2),l(`span`,null,`Socket.IO: `+o(W.socketIo?`Enabled`:`Disabled`),1)],2),l(`div`,{class:r([`status-row`,W.redis?`text-success`:`text-secondary`])},[l(`i`,{class:r(W.redis?`bi bi-check-circle-fill`:`bi bi-dash-circle-fill`)},null,2),l(`span`,null,`Redis: `+o(W.redis?`Enabled`:`Disabled`),1)],2),l(`div`,{class:r([`status-row`,W.redisAdapter?`text-success`:`text-secondary`])},[l(`i`,{class:r(W.redisAdapter?`bi bi-check-circle-fill`:`bi bi-dash-circle-fill`)},null,2),l(`span`,null,`Redis Adapter: `+o(W.redisAdapter?`Active`:`Inactive`),1)],2),n[10]||=l(`hr`,null,null,-1),l(`div`,{class:r([`socket-status`,G.value?`text-success`:`text-warning`])},[l(`span`,{class:r([`socket-dot`,{connected:G.value}])},null,2),l(`span`,null,o(G.value?`Socket connected`:`Socket connecting...`),1)],2)])]),l(`div`,x,[n[17]||=l(`div`,{class:`card-header d-flex align-items-center gap-2`},[l(`i`,{class:`bi bi-broadcast`}),l(`span`,{class:`fw-semibold`},`Broadcast Controls`)],-1),l(`div`,S,[l(`button`,{class:`btn btn-primary`,onClick:n[0]||=e=>Q(`all`),disabled:K.value},[...n[12]||=[l(`i`,{class:`bi bi-globe me-1`},null,-1),h(` Broadcast All `,-1)]],8,C),l(`button`,{class:`btn btn-info text-white`,onClick:n[1]||=e=>Q(`auth`),disabled:K.value},[...n[13]||=[l(`i`,{class:`bi bi-shield-check me-1`},null,-1),h(` Broadcast Auth `,-1)]],8,w),l(`button`,{class:`btn btn-warning`,onClick:n[2]||=e=>Q(`role`),disabled:K.value},[...n[14]||=[l(`i`,{class:`bi bi-person-badge me-1`},null,-1),h(` Broadcast Admin Role `,-1)]],8,T),l(`button`,{class:`btn btn-secondary`,onClick:n[3]||=e=>Q(`user`),disabled:K.value},[...n[15]||=[l(`i`,{class:`bi bi-person me-1`},null,-1),h(` Broadcast User `,-1)]],8,E),l(`button`,{class:`btn btn-success`,onClick:n[4]||=e=>Q(`queue`),disabled:K.value},[...n[16]||=[l(`i`,{class:`bi bi-arrow-repeat me-1`},null,-1),h(` Broadcast + Queue `,-1)]],8,D)])]),l(`div`,O,[n[22]||=l(`div`,{class:`card-header d-flex align-items-center gap-2`},[l(`i`,{class:`bi bi-bell`}),l(`span`,{class:`fw-semibold`},`Notification Test`)],-1),l(`div`,k,[l(`button`,{class:`btn btn-outline-primary w-100`,onClick:n[5]||=e=>Z(`db`),disabled:K.value},[...n[18]||=[l(`i`,{class:`bi bi-database me-1`},null,-1),h(` DB Only `,-1)]],8,A),l(`button`,{class:`btn btn-outline-success w-100`,onClick:n[6]||=e=>Z(`db-broadcast`),disabled:K.value},[...n[19]||=[l(`i`,{class:`bi bi-bell me-1`},null,-1),h(` DB + Broadcast `,-1)]],8,j),l(`button`,{class:`btn btn-outline-info text-white w-100`,onClick:n[7]||=e=>Z(`db-broadcast-mail`),disabled:K.value},[...n[20]||=[l(`i`,{class:`bi bi-envelope me-1`},null,-1),h(` DB + Broadcast + Mail `,-1)]],8,M),l(`button`,{class:`btn btn-outline-warning w-100`,onClick:n[8]||=e=>Z(`db-mail`),disabled:K.value},[...n[21]||=[l(`i`,{class:`bi bi-envelope me-1`},null,-1),h(` DB + Mail (no socket) `,-1)]],8,se)])])]),l(`div`,N,[l(`div`,P,[l(`div`,F,[l(`div`,I,[n[23]||=l(`i`,{class:`bi bi-list-ul`},null,-1),n[24]||=l(`span`,{class:`fw-semibold`},`Event Log`,-1),l(`span`,L,o(q.value.length),1)]),l(`button`,{class:`btn btn-sm btn-outline-danger`,onClick:n[9]||=e=>q.value=[]},[...n[25]||=[l(`i`,{class:`bi bi-trash`},null,-1),h(` Clear `,-1)]])]),l(`div`,R,[l(`div`,{class:`event-log`,ref_key:`logRef`,ref:J},[q.value.length===0?(e(),g(`div`,z,` No events received yet. Click a broadcast button above. `)):ne(``,!0),(e(!0),g(f,null,te(q.value,(t,n)=>(e(),g(`div`,{key:n,class:`event-entry`},[l(`div`,B,[l(`span`,{class:r([`event-badge`,t.mode])},o(t.mode),3),l(`span`,V,o(t.event),1),l(`span`,H,o(t.time),1)]),l(`pre`,U,o(t.payload),1)]))),128))],512)])])])])])],64))}}),[[`__scopeId`,`data-v-b8a29e71`]]);export{W as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,H as r,L as i,N as a,S as o,U as s,V as c,c as l,f as u,g as d,o as f,t as p,v as m,x as h,y as g,z as _}from"./index-Bleyx5dm.js";import{t as v}from"./Input-z8GI8Aqo.js";import{t as y}from"./InputPasswordToggle-BxlzVGp3.js";var b={class:`container position-absolute start-50 top-50 translate-middle`},x={class:`auth col-12 col-sm-9 col-md-7 col-lg-5 col-xl-4 mx-auto py-5`},S={class:`card card-body border-0`},C={class:`mb-4`},w={class:`mb-4`},T={class:`mb-4`},E={class:`mb-4`},D=[`disabled`],O={class:`text-center mt-3`},k=n({__name:`register`,setup(n){l({title:`Register`});let k=f(),A=p(),j=_({name:``,email:``,password:``,password_confirmation:``}),M=t(``),N=t(!1),P=async()=>{if(M.value=``,N.value=!1,j.password!==j.password_confirmation){N.value=!0,M.value=`Password confirmation does not match`;return}try{let e=await A.register({name:j.name.trim(),email:j.email.trim(),password:j.password,password_confirmation:j.password_confirmation});if(A.isAuthenticated){await k.push(`/`);return}M.value=e||`Registration successful. Please verify your email.`}catch(e){N.value=!0,M.value=e instanceof Error?e.message:`Unable to register right now`}};return(t,n)=>{let l=a(`router-link`);return e(),g(`div`,b,[d(`div`,x,[d(`div`,S,[n[7]||=d(`div`,{class:`d-block mb-2`},[d(`h3`,{class:`m-0 text-uppercase text-center fw-semibold`},`nexgen`)],-1),n[8]||=d(`h4`,{class:`text-center`},`Create Account`,-1),M.value?(e(),g(`p`,{key:0,class:r([`text-center alert py-1 mt-2`,N.value?`alert-danger text-danger`:`alert-success text-success`])},s(M.value),3)):m(``,!0),d(`form`,{onSubmit:u(P,[`prevent`])},[d(`div`,C,[o(v,{id:`name`,modelValue:j.name,"onUpdate:modelValue":n[0]||=e=>j.name=e,type:`text`,label:`name`,placeholder:`Enter your name...`,err:!1,focus:``,must:``},null,8,[`modelValue`])]),d(`div`,w,[o(v,{id:`email`,modelValue:j.email,"onUpdate:modelValue":n[1]||=e=>j.email=e,type:`email`,label:`email`,placeholder:`Enter your email...`,err:!1,must:``},null,8,[`modelValue`])]),d(`div`,T,[o(y,{id:`password`,modelValue:j.password,"onUpdate:modelValue":n[2]||=e=>j.password=e,label:`password`,placeholder:`Create a password...`,err:!1,must:``},null,8,[`modelValue`])]),d(`div`,E,[o(y,{id:`password_confirmation`,modelValue:j.password_confirmation,"onUpdate:modelValue":n[3]||=e=>j.password_confirmation=e,label:`confirm password`,placeholder:`Confirm your password...`,err:!1,must:``},null,8,[`modelValue`])]),d(`button`,{type:`submit`,class:`btn btn-primary w-100`,disabled:c(A).processing},[...n[4]||=[d(`span`,null,`Create Account`,-1),d(`i`,{class:`bi bi-person-plus ms-2`},null,-1)]],8,D)],32),d(`div`,O,[n[6]||=d(`span`,{class:`text-muted`},`Already have an account?`,-1),o(l,{to:`/login`,class:`ms-1 text-decoration-none`},{default:i(()=>[...n[5]||=[h(`Login`,-1)]]),_:1})])])])])}}});export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,H as r,L as i,N as a,S as o,U as s,V as c,a as l,c as u,f as d,g as f,o as p,t as m,v as h,y as g,z as _}from"./index-Bleyx5dm.js";import{t as v}from"./Input-z8GI8Aqo.js";import{t as y}from"./Button-_7aQ7gHL.js";var b={class:`container position-absolute start-50 top-50 translate-middle`},x={class:`auth col-12 col-sm-9 col-md-7 col-lg-5 col-xl-4 mx-auto py-5`},S={class:`card card-body border-0`},C={class:`mb-4`},w={class:`mb-4`},T={class:`text-center mt-2`},E=n({__name:`resetPassword`,setup(n){u({title:`Reset Password`});let E=l(),D=p(),O=m(),k=_({email:String(E.query.email||``),token:String(E.query.token||``),password:``,password_confirmation:``}),A=!!(k.token&&k.email),j=t(A?`Set your new password`:`Invalid reset link. Please request a new one.`),M=t(!A),N=async()=>{if(A){if(j.value=``,M.value=!1,k.password!==k.password_confirmation){M.value=!0,j.value=`Password confirmation does not match`;return}try{j.value=await O.resetPassword({email:k.email.trim(),token:k.token.trim(),password:k.password,password_confirmation:k.password_confirmation}),await D.push(`/login`)}catch(e){M.value=!0,j.value=e instanceof Error?e.message:`Failed to reset password`}}};return(t,n)=>{let l=a(`router-link`);return e(),g(`div`,b,[f(`div`,x,[f(`div`,S,[n[3]||=f(`div`,{class:`d-block mb-2`},[f(`h3`,{class:`m-0 text-uppercase text-center fw-semibold`},`nexgen`)],-1),n[4]||=f(`h4`,{class:`text-center`},`Reset Password`,-1),j.value?(e(),g(`p`,{key:0,class:r([`text-center alert py-1 mt-2`,M.value?`alert-danger text-danger`:`alert-success text-success`])},s(j.value),3)):h(``,!0),f(`form`,{id:`formAuthentication`,class:r({"pe-none opacity-50":!A}),onSubmit:d(N,[`prevent`])},[f(`div`,C,[o(v,{id:`password`,modelValue:k.password,"onUpdate:modelValue":n[0]||=e=>k.password=e,type:`password`,label:`new password`,placeholder:`Enter new password...`,err:!1,focus:``,must:``},null,8,[`modelValue`])]),f(`div`,w,[o(v,{id:`password_confirmation`,modelValue:k.password_confirmation,"onUpdate:modelValue":n[1]||=e=>k.password_confirmation=e,type:`password`,label:`confirm password`,placeholder:`Confirm new password...`,err:!1,must:``},null,8,[`modelValue`])]),o(y,{type:`submit`,label:`Reset Password`,class:`btn btn-primary d-grid w-100`,icon:`bi bi-key ms-2`,disabled:c(O).processing},null,8,[`disabled`])],34),f(`div`,T,[o(l,{to:`/login`},{default:i(()=>[...n[2]||=[f(`i`,{class:`bx bx-chevron-left scaleX-n1-rtl me-1`},null,-1),f(`span`,null,`Back to login`,-1)]]),_:1})])])])])}}});export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,H as r,L as i,N as a,S as o,U as s,a as c,c as l,g as u,t as d,v as f,y as p}from"./index-Bleyx5dm.js";var m={class:`container position-absolute start-50 top-50 translate-middle`},h={class:`auth col-12 col-sm-9 col-md-7 col-lg-5 col-xl-4 mx-auto py-5`},g={class:`card card-body border-0`},_={class:`text-center mt-2`},v=n({__name:`verifyEmail`,setup(n){l({title:`Verify Email`});let v=c(),y=d(),b=String(v.query.email||``).trim(),x=String(v.query.token||``).trim(),S=t(`Verifying your email...`),C=t(!1);return(async()=>{if(!b||!x){C.value=!0,S.value=`Invalid verification link. Please request a new one.`;return}try{S.value=await y.verifyEmail({email:b,token:x}),C.value=!1}catch(e){C.value=!0,S.value=e instanceof Error?e.message:`Failed to verify email`}})(),(t,n)=>{let c=a(`router-link`);return e(),p(`div`,m,[u(`div`,h,[u(`div`,g,[n[1]||=u(`div`,{class:`d-block mb-2`},[u(`h3`,{class:`m-0 text-uppercase text-center fw-semibold`},`nexgen`)],-1),n[2]||=u(`h4`,{class:`text-center`},`Email Verification`,-1),S.value?(e(),p(`p`,{key:0,class:r([`text-center alert py-2 mt-2`,C.value?`alert-danger text-danger`:`alert-success text-success`])},s(S.value),3)):f(``,!0),u(`div`,_,[o(c,{to:`/login`},{default:i(()=>[...n[0]||=[u(`span`,null,`Back to login`,-1)]]),_:1})])])])])}}});export{v as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="../admin/src/assets/images/favicon/favicon.ico" />
|
|
7
|
+
<title>NEXGEN</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Bleyx5dm.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DUw8E6Yg.css">
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<div id="modal-show"></div>
|
|
14
|
+
<div id="toast-show"></div>
|
|
15
|
+
<div id="app"></div>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
CREATE TABLE `notifications` (
|
|
2
|
+
`id` int AUTO_INCREMENT NOT NULL,
|
|
3
|
+
`user_id` int NOT NULL,
|
|
4
|
+
`type` varchar(100) NOT NULL,
|
|
5
|
+
`title` varchar(255) NOT NULL,
|
|
6
|
+
`body` text,
|
|
7
|
+
`data` text,
|
|
8
|
+
`link` varchar(500),
|
|
9
|
+
`read_at` timestamp,
|
|
10
|
+
`created_at` timestamp NOT NULL DEFAULT (now()),
|
|
11
|
+
CONSTRAINT `notifications_id` PRIMARY KEY(`id`)
|
|
12
|
+
);
|
|
13
|
+
--> statement-breakpoint
|
|
14
|
+
CREATE TABLE `roles` (
|
|
15
|
+
`id` int AUTO_INCREMENT NOT NULL,
|
|
16
|
+
`name` varchar(255) NOT NULL,
|
|
17
|
+
`created_at` timestamp NOT NULL DEFAULT (now()),
|
|
18
|
+
`updated_at` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
|
19
|
+
CONSTRAINT `roles_id` PRIMARY KEY(`id`),
|
|
20
|
+
CONSTRAINT `roles_name_unique` UNIQUE(`name`)
|
|
21
|
+
);
|
|
22
|
+
--> statement-breakpoint
|
|
23
|
+
CREATE TABLE `email_verification_tokens` (
|
|
24
|
+
`id` int AUTO_INCREMENT NOT NULL,
|
|
25
|
+
`email` varchar(255) NOT NULL,
|
|
26
|
+
`token` text NOT NULL,
|
|
27
|
+
`expires_at` timestamp NOT NULL,
|
|
28
|
+
`created_at` timestamp NOT NULL DEFAULT (now()),
|
|
29
|
+
CONSTRAINT `email_verification_tokens_id` PRIMARY KEY(`id`)
|
|
30
|
+
);
|
|
31
|
+
--> statement-breakpoint
|
|
32
|
+
CREATE TABLE `password_reset_tokens` (
|
|
33
|
+
`id` int AUTO_INCREMENT NOT NULL,
|
|
34
|
+
`email` varchar(255) NOT NULL,
|
|
35
|
+
`token` text NOT NULL,
|
|
36
|
+
`expires_at` timestamp NOT NULL,
|
|
37
|
+
`created_at` timestamp NOT NULL DEFAULT (now()),
|
|
38
|
+
CONSTRAINT `password_reset_tokens_id` PRIMARY KEY(`id`)
|
|
39
|
+
);
|
|
40
|
+
--> statement-breakpoint
|
|
41
|
+
CREATE TABLE `refresh_tokens` (
|
|
42
|
+
`id` int AUTO_INCREMENT NOT NULL,
|
|
43
|
+
`user_id` int,
|
|
44
|
+
`jti` varchar(191) NOT NULL,
|
|
45
|
+
`revoked` boolean DEFAULT false,
|
|
46
|
+
`expires_at` timestamp NOT NULL,
|
|
47
|
+
`created_at` timestamp NOT NULL DEFAULT (now()),
|
|
48
|
+
CONSTRAINT `refresh_tokens_id` PRIMARY KEY(`id`),
|
|
49
|
+
CONSTRAINT `refresh_tokens_jti_unique` UNIQUE(`jti`)
|
|
50
|
+
);
|
|
51
|
+
--> statement-breakpoint
|
|
52
|
+
CREATE TABLE `users` (
|
|
53
|
+
`id` int AUTO_INCREMENT NOT NULL,
|
|
54
|
+
`name` varchar(255) NOT NULL,
|
|
55
|
+
`email` varchar(255) NOT NULL,
|
|
56
|
+
`password` text NOT NULL,
|
|
57
|
+
`role_id` int,
|
|
58
|
+
`email_verified_at` timestamp,
|
|
59
|
+
`created_at` timestamp NOT NULL DEFAULT (now()),
|
|
60
|
+
`updated_at` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
|
61
|
+
CONSTRAINT `users_id` PRIMARY KEY(`id`),
|
|
62
|
+
CONSTRAINT `users_email_unique` UNIQUE(`email`)
|
|
63
|
+
);
|
|
64
|
+
--> statement-breakpoint
|
|
65
|
+
CREATE TABLE `welcomes` (
|
|
66
|
+
`id` int AUTO_INCREMENT NOT NULL,
|
|
67
|
+
`title` varchar(255) NOT NULL,
|
|
68
|
+
CONSTRAINT `welcomes_id` PRIMARY KEY(`id`)
|
|
69
|
+
);
|
|
70
|
+
--> statement-breakpoint
|
|
71
|
+
ALTER TABLE `notifications` ADD CONSTRAINT `notifications_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
|
|
72
|
+
ALTER TABLE `refresh_tokens` ADD CONSTRAINT `refresh_tokens_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
|
|
73
|
+
ALTER TABLE `users` ADD CONSTRAINT `users_role_id_roles_id_fk` FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON DELETE set null ON UPDATE cascade;
|
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "5",
|
|
3
|
+
"dialect": "mysql",
|
|
4
|
+
"id": "51cf6aa2-8e50-4c83-bfed-324051de1ab7",
|
|
5
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
|
+
"tables": {
|
|
7
|
+
"notifications": {
|
|
8
|
+
"name": "notifications",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "int",
|
|
13
|
+
"primaryKey": false,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": true
|
|
16
|
+
},
|
|
17
|
+
"user_id": {
|
|
18
|
+
"name": "user_id",
|
|
19
|
+
"type": "int",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"type": {
|
|
25
|
+
"name": "type",
|
|
26
|
+
"type": "varchar(100)",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"title": {
|
|
32
|
+
"name": "title",
|
|
33
|
+
"type": "varchar(255)",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"body": {
|
|
39
|
+
"name": "body",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": false,
|
|
43
|
+
"autoincrement": false
|
|
44
|
+
},
|
|
45
|
+
"data": {
|
|
46
|
+
"name": "data",
|
|
47
|
+
"type": "text",
|
|
48
|
+
"primaryKey": false,
|
|
49
|
+
"notNull": false,
|
|
50
|
+
"autoincrement": false
|
|
51
|
+
},
|
|
52
|
+
"link": {
|
|
53
|
+
"name": "link",
|
|
54
|
+
"type": "varchar(500)",
|
|
55
|
+
"primaryKey": false,
|
|
56
|
+
"notNull": false,
|
|
57
|
+
"autoincrement": false
|
|
58
|
+
},
|
|
59
|
+
"read_at": {
|
|
60
|
+
"name": "read_at",
|
|
61
|
+
"type": "timestamp",
|
|
62
|
+
"primaryKey": false,
|
|
63
|
+
"notNull": false,
|
|
64
|
+
"autoincrement": false
|
|
65
|
+
},
|
|
66
|
+
"created_at": {
|
|
67
|
+
"name": "created_at",
|
|
68
|
+
"type": "timestamp",
|
|
69
|
+
"primaryKey": false,
|
|
70
|
+
"notNull": true,
|
|
71
|
+
"autoincrement": false,
|
|
72
|
+
"default": "(now())"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"indexes": {},
|
|
76
|
+
"foreignKeys": {
|
|
77
|
+
"notifications_user_id_users_id_fk": {
|
|
78
|
+
"name": "notifications_user_id_users_id_fk",
|
|
79
|
+
"tableFrom": "notifications",
|
|
80
|
+
"tableTo": "users",
|
|
81
|
+
"columnsFrom": [
|
|
82
|
+
"user_id"
|
|
83
|
+
],
|
|
84
|
+
"columnsTo": [
|
|
85
|
+
"id"
|
|
86
|
+
],
|
|
87
|
+
"onDelete": "cascade",
|
|
88
|
+
"onUpdate": "cascade"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"compositePrimaryKeys": {
|
|
92
|
+
"notifications_id": {
|
|
93
|
+
"name": "notifications_id",
|
|
94
|
+
"columns": [
|
|
95
|
+
"id"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"uniqueConstraints": {},
|
|
100
|
+
"checkConstraint": {}
|
|
101
|
+
},
|
|
102
|
+
"roles": {
|
|
103
|
+
"name": "roles",
|
|
104
|
+
"columns": {
|
|
105
|
+
"id": {
|
|
106
|
+
"name": "id",
|
|
107
|
+
"type": "int",
|
|
108
|
+
"primaryKey": false,
|
|
109
|
+
"notNull": true,
|
|
110
|
+
"autoincrement": true
|
|
111
|
+
},
|
|
112
|
+
"name": {
|
|
113
|
+
"name": "name",
|
|
114
|
+
"type": "varchar(255)",
|
|
115
|
+
"primaryKey": false,
|
|
116
|
+
"notNull": true,
|
|
117
|
+
"autoincrement": false
|
|
118
|
+
},
|
|
119
|
+
"created_at": {
|
|
120
|
+
"name": "created_at",
|
|
121
|
+
"type": "timestamp",
|
|
122
|
+
"primaryKey": false,
|
|
123
|
+
"notNull": true,
|
|
124
|
+
"autoincrement": false,
|
|
125
|
+
"default": "(now())"
|
|
126
|
+
},
|
|
127
|
+
"updated_at": {
|
|
128
|
+
"name": "updated_at",
|
|
129
|
+
"type": "timestamp",
|
|
130
|
+
"primaryKey": false,
|
|
131
|
+
"notNull": true,
|
|
132
|
+
"autoincrement": false,
|
|
133
|
+
"onUpdate": true,
|
|
134
|
+
"default": "(now())"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"indexes": {},
|
|
138
|
+
"foreignKeys": {},
|
|
139
|
+
"compositePrimaryKeys": {
|
|
140
|
+
"roles_id": {
|
|
141
|
+
"name": "roles_id",
|
|
142
|
+
"columns": [
|
|
143
|
+
"id"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"uniqueConstraints": {
|
|
148
|
+
"roles_name_unique": {
|
|
149
|
+
"name": "roles_name_unique",
|
|
150
|
+
"columns": [
|
|
151
|
+
"name"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"checkConstraint": {}
|
|
156
|
+
},
|
|
157
|
+
"email_verification_tokens": {
|
|
158
|
+
"name": "email_verification_tokens",
|
|
159
|
+
"columns": {
|
|
160
|
+
"id": {
|
|
161
|
+
"name": "id",
|
|
162
|
+
"type": "int",
|
|
163
|
+
"primaryKey": false,
|
|
164
|
+
"notNull": true,
|
|
165
|
+
"autoincrement": true
|
|
166
|
+
},
|
|
167
|
+
"email": {
|
|
168
|
+
"name": "email",
|
|
169
|
+
"type": "varchar(255)",
|
|
170
|
+
"primaryKey": false,
|
|
171
|
+
"notNull": true,
|
|
172
|
+
"autoincrement": false
|
|
173
|
+
},
|
|
174
|
+
"token": {
|
|
175
|
+
"name": "token",
|
|
176
|
+
"type": "text",
|
|
177
|
+
"primaryKey": false,
|
|
178
|
+
"notNull": true,
|
|
179
|
+
"autoincrement": false
|
|
180
|
+
},
|
|
181
|
+
"expires_at": {
|
|
182
|
+
"name": "expires_at",
|
|
183
|
+
"type": "timestamp",
|
|
184
|
+
"primaryKey": false,
|
|
185
|
+
"notNull": true,
|
|
186
|
+
"autoincrement": false
|
|
187
|
+
},
|
|
188
|
+
"created_at": {
|
|
189
|
+
"name": "created_at",
|
|
190
|
+
"type": "timestamp",
|
|
191
|
+
"primaryKey": false,
|
|
192
|
+
"notNull": true,
|
|
193
|
+
"autoincrement": false,
|
|
194
|
+
"default": "(now())"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"indexes": {},
|
|
198
|
+
"foreignKeys": {},
|
|
199
|
+
"compositePrimaryKeys": {
|
|
200
|
+
"email_verification_tokens_id": {
|
|
201
|
+
"name": "email_verification_tokens_id",
|
|
202
|
+
"columns": [
|
|
203
|
+
"id"
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"uniqueConstraints": {},
|
|
208
|
+
"checkConstraint": {}
|
|
209
|
+
},
|
|
210
|
+
"password_reset_tokens": {
|
|
211
|
+
"name": "password_reset_tokens",
|
|
212
|
+
"columns": {
|
|
213
|
+
"id": {
|
|
214
|
+
"name": "id",
|
|
215
|
+
"type": "int",
|
|
216
|
+
"primaryKey": false,
|
|
217
|
+
"notNull": true,
|
|
218
|
+
"autoincrement": true
|
|
219
|
+
},
|
|
220
|
+
"email": {
|
|
221
|
+
"name": "email",
|
|
222
|
+
"type": "varchar(255)",
|
|
223
|
+
"primaryKey": false,
|
|
224
|
+
"notNull": true,
|
|
225
|
+
"autoincrement": false
|
|
226
|
+
},
|
|
227
|
+
"token": {
|
|
228
|
+
"name": "token",
|
|
229
|
+
"type": "text",
|
|
230
|
+
"primaryKey": false,
|
|
231
|
+
"notNull": true,
|
|
232
|
+
"autoincrement": false
|
|
233
|
+
},
|
|
234
|
+
"expires_at": {
|
|
235
|
+
"name": "expires_at",
|
|
236
|
+
"type": "timestamp",
|
|
237
|
+
"primaryKey": false,
|
|
238
|
+
"notNull": true,
|
|
239
|
+
"autoincrement": false
|
|
240
|
+
},
|
|
241
|
+
"created_at": {
|
|
242
|
+
"name": "created_at",
|
|
243
|
+
"type": "timestamp",
|
|
244
|
+
"primaryKey": false,
|
|
245
|
+
"notNull": true,
|
|
246
|
+
"autoincrement": false,
|
|
247
|
+
"default": "(now())"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"indexes": {},
|
|
251
|
+
"foreignKeys": {},
|
|
252
|
+
"compositePrimaryKeys": {
|
|
253
|
+
"password_reset_tokens_id": {
|
|
254
|
+
"name": "password_reset_tokens_id",
|
|
255
|
+
"columns": [
|
|
256
|
+
"id"
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"uniqueConstraints": {},
|
|
261
|
+
"checkConstraint": {}
|
|
262
|
+
},
|
|
263
|
+
"refresh_tokens": {
|
|
264
|
+
"name": "refresh_tokens",
|
|
265
|
+
"columns": {
|
|
266
|
+
"id": {
|
|
267
|
+
"name": "id",
|
|
268
|
+
"type": "int",
|
|
269
|
+
"primaryKey": false,
|
|
270
|
+
"notNull": true,
|
|
271
|
+
"autoincrement": true
|
|
272
|
+
},
|
|
273
|
+
"user_id": {
|
|
274
|
+
"name": "user_id",
|
|
275
|
+
"type": "int",
|
|
276
|
+
"primaryKey": false,
|
|
277
|
+
"notNull": false,
|
|
278
|
+
"autoincrement": false
|
|
279
|
+
},
|
|
280
|
+
"jti": {
|
|
281
|
+
"name": "jti",
|
|
282
|
+
"type": "varchar(191)",
|
|
283
|
+
"primaryKey": false,
|
|
284
|
+
"notNull": true,
|
|
285
|
+
"autoincrement": false
|
|
286
|
+
},
|
|
287
|
+
"revoked": {
|
|
288
|
+
"name": "revoked",
|
|
289
|
+
"type": "boolean",
|
|
290
|
+
"primaryKey": false,
|
|
291
|
+
"notNull": false,
|
|
292
|
+
"autoincrement": false,
|
|
293
|
+
"default": false
|
|
294
|
+
},
|
|
295
|
+
"expires_at": {
|
|
296
|
+
"name": "expires_at",
|
|
297
|
+
"type": "timestamp",
|
|
298
|
+
"primaryKey": false,
|
|
299
|
+
"notNull": true,
|
|
300
|
+
"autoincrement": false
|
|
301
|
+
},
|
|
302
|
+
"created_at": {
|
|
303
|
+
"name": "created_at",
|
|
304
|
+
"type": "timestamp",
|
|
305
|
+
"primaryKey": false,
|
|
306
|
+
"notNull": true,
|
|
307
|
+
"autoincrement": false,
|
|
308
|
+
"default": "(now())"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"indexes": {},
|
|
312
|
+
"foreignKeys": {
|
|
313
|
+
"refresh_tokens_user_id_users_id_fk": {
|
|
314
|
+
"name": "refresh_tokens_user_id_users_id_fk",
|
|
315
|
+
"tableFrom": "refresh_tokens",
|
|
316
|
+
"tableTo": "users",
|
|
317
|
+
"columnsFrom": [
|
|
318
|
+
"user_id"
|
|
319
|
+
],
|
|
320
|
+
"columnsTo": [
|
|
321
|
+
"id"
|
|
322
|
+
],
|
|
323
|
+
"onDelete": "set null",
|
|
324
|
+
"onUpdate": "cascade"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"compositePrimaryKeys": {
|
|
328
|
+
"refresh_tokens_id": {
|
|
329
|
+
"name": "refresh_tokens_id",
|
|
330
|
+
"columns": [
|
|
331
|
+
"id"
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"uniqueConstraints": {
|
|
336
|
+
"refresh_tokens_jti_unique": {
|
|
337
|
+
"name": "refresh_tokens_jti_unique",
|
|
338
|
+
"columns": [
|
|
339
|
+
"jti"
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"checkConstraint": {}
|
|
344
|
+
},
|
|
345
|
+
"users": {
|
|
346
|
+
"name": "users",
|
|
347
|
+
"columns": {
|
|
348
|
+
"id": {
|
|
349
|
+
"name": "id",
|
|
350
|
+
"type": "int",
|
|
351
|
+
"primaryKey": false,
|
|
352
|
+
"notNull": true,
|
|
353
|
+
"autoincrement": true
|
|
354
|
+
},
|
|
355
|
+
"name": {
|
|
356
|
+
"name": "name",
|
|
357
|
+
"type": "varchar(255)",
|
|
358
|
+
"primaryKey": false,
|
|
359
|
+
"notNull": true,
|
|
360
|
+
"autoincrement": false
|
|
361
|
+
},
|
|
362
|
+
"email": {
|
|
363
|
+
"name": "email",
|
|
364
|
+
"type": "varchar(255)",
|
|
365
|
+
"primaryKey": false,
|
|
366
|
+
"notNull": true,
|
|
367
|
+
"autoincrement": false
|
|
368
|
+
},
|
|
369
|
+
"password": {
|
|
370
|
+
"name": "password",
|
|
371
|
+
"type": "text",
|
|
372
|
+
"primaryKey": false,
|
|
373
|
+
"notNull": true,
|
|
374
|
+
"autoincrement": false
|
|
375
|
+
},
|
|
376
|
+
"role_id": {
|
|
377
|
+
"name": "role_id",
|
|
378
|
+
"type": "int",
|
|
379
|
+
"primaryKey": false,
|
|
380
|
+
"notNull": false,
|
|
381
|
+
"autoincrement": false
|
|
382
|
+
},
|
|
383
|
+
"email_verified_at": {
|
|
384
|
+
"name": "email_verified_at",
|
|
385
|
+
"type": "timestamp",
|
|
386
|
+
"primaryKey": false,
|
|
387
|
+
"notNull": false,
|
|
388
|
+
"autoincrement": false
|
|
389
|
+
},
|
|
390
|
+
"created_at": {
|
|
391
|
+
"name": "created_at",
|
|
392
|
+
"type": "timestamp",
|
|
393
|
+
"primaryKey": false,
|
|
394
|
+
"notNull": true,
|
|
395
|
+
"autoincrement": false,
|
|
396
|
+
"default": "(now())"
|
|
397
|
+
},
|
|
398
|
+
"updated_at": {
|
|
399
|
+
"name": "updated_at",
|
|
400
|
+
"type": "timestamp",
|
|
401
|
+
"primaryKey": false,
|
|
402
|
+
"notNull": true,
|
|
403
|
+
"autoincrement": false,
|
|
404
|
+
"onUpdate": true,
|
|
405
|
+
"default": "(now())"
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"indexes": {},
|
|
409
|
+
"foreignKeys": {
|
|
410
|
+
"users_role_id_roles_id_fk": {
|
|
411
|
+
"name": "users_role_id_roles_id_fk",
|
|
412
|
+
"tableFrom": "users",
|
|
413
|
+
"tableTo": "roles",
|
|
414
|
+
"columnsFrom": [
|
|
415
|
+
"role_id"
|
|
416
|
+
],
|
|
417
|
+
"columnsTo": [
|
|
418
|
+
"id"
|
|
419
|
+
],
|
|
420
|
+
"onDelete": "set null",
|
|
421
|
+
"onUpdate": "cascade"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"compositePrimaryKeys": {
|
|
425
|
+
"users_id": {
|
|
426
|
+
"name": "users_id",
|
|
427
|
+
"columns": [
|
|
428
|
+
"id"
|
|
429
|
+
]
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"uniqueConstraints": {
|
|
433
|
+
"users_email_unique": {
|
|
434
|
+
"name": "users_email_unique",
|
|
435
|
+
"columns": [
|
|
436
|
+
"email"
|
|
437
|
+
]
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"checkConstraint": {}
|
|
441
|
+
},
|
|
442
|
+
"welcomes": {
|
|
443
|
+
"name": "welcomes",
|
|
444
|
+
"columns": {
|
|
445
|
+
"id": {
|
|
446
|
+
"name": "id",
|
|
447
|
+
"type": "int",
|
|
448
|
+
"primaryKey": false,
|
|
449
|
+
"notNull": true,
|
|
450
|
+
"autoincrement": true
|
|
451
|
+
},
|
|
452
|
+
"title": {
|
|
453
|
+
"name": "title",
|
|
454
|
+
"type": "varchar(255)",
|
|
455
|
+
"primaryKey": false,
|
|
456
|
+
"notNull": true,
|
|
457
|
+
"autoincrement": false
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
"indexes": {},
|
|
461
|
+
"foreignKeys": {},
|
|
462
|
+
"compositePrimaryKeys": {
|
|
463
|
+
"welcomes_id": {
|
|
464
|
+
"name": "welcomes_id",
|
|
465
|
+
"columns": [
|
|
466
|
+
"id"
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"uniqueConstraints": {},
|
|
471
|
+
"checkConstraint": {}
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"views": {},
|
|
475
|
+
"_meta": {
|
|
476
|
+
"schemas": {},
|
|
477
|
+
"tables": {},
|
|
478
|
+
"columns": {}
|
|
479
|
+
},
|
|
480
|
+
"internal": {
|
|
481
|
+
"tables": {},
|
|
482
|
+
"indexes": {}
|
|
483
|
+
}
|
|
484
|
+
}
|