generated from avior/template-web-astro
@ -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>
|
||||
|
Reference in New Issue
Block a user