update,
This commit is contained in:
28
tsc1877/task1/project/stack.md
Normal file
28
tsc1877/task1/project/stack.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Stack
|
||||
|
||||
### nodejs
|
||||
|
||||
### nextjs
|
||||
|
||||
### orm
|
||||
|
||||
- https://sequelize.org/
|
||||
|
||||
```js
|
||||
import { Sequelize, DataTypes } from "sequelize";
|
||||
|
||||
const sequelize = new Sequelize("sqlite::memory:");
|
||||
const User = sequelize.define("User", {
|
||||
username: DataTypes.STRING,
|
||||
birthday: DataTypes.DATE,
|
||||
});
|
||||
```
|
||||
|
||||
```js
|
||||
const jane = await User.create({
|
||||
username: "janedoe",
|
||||
birthday: new Date(1980, 6, 20),
|
||||
});
|
||||
|
||||
const users = await User.findAll();
|
||||
```
|
Reference in New Issue
Block a user