fix: update

Signed-off-by: Avior <git@avior.me>
This commit is contained in:
2024-10-09 17:47:31 +02:00
parent 7fa18d682d
commit e38bc9b0b2
69 changed files with 3482 additions and 2071 deletions

View File

@ -1,22 +1,22 @@
import Schema, { type Impl } from 'models/Schema'
import Schema, { s, type SchemaInfer } from 'libs/Schema'
const schema = new Schema({
/**
* the project ID
*/
id: {type: String, database: {unique: true, index: true, auto: true}},
project: String, // project id
id: s.string().attr('db:unique', 'db:auto'),
project: s.string(), // project id
/**
* the email the project was created from
*/
name: { type: String, nullable: true },
name: s.string().nullable(),
color: { type: String, nullable: true },
color: s.string().nullable(),
preset: { type: Boolean, defaultValue: false }
preset: s.boolean().defaultValue(false)
})
export default schema
export type StateObj = Impl<typeof schema>
export type StateObj = SchemaInfer<typeof schema>