📅  最后修改于: 2022-03-11 14:48:21.930000             🧑  作者: Mango
import User from 'App/Models/User'
const user = new User()
// Assign username and email
user.username = 'virk'
user.email = 'virk@adonisjs.com'
// Insert to the database
await user.save()
console.log(user.$isPersisted) // true