Domain Documentation

Class Follows

public final class Follows: Model  

Representation of Follows table.

Follows Follows Model Model Follows->Model

Conforms To

Model

Initializers

init()

public init()  

init(id:​followee:​follower:​)

public init( id: Int?, followee: Int, follower: Int )  

Default initializer.

Parameters

id Int?

See id

followee Int

See followee

follower Int

See follower

Properties

schema

public static let schema = "Follows"

id

@ID(custom: .id, generatedBy: .database)
    public var id: Int? 

A Identifier.

It is assumed that the value is entered on the Database side. The application does not change this value usually.

followee

@Parent(key: "followee")
    public var followee: Users

A followee. It's a Users's id.

follower

@Parent(key: "follower")
    public var follower: Users

A follower. It's a Users's id.

Methods

create(on:​)

public static func create(on database: MySQLDatabase) -> EventLoopFuture<Void>  

Execute SQL statement for table creation.

In general, you should use features provided by the following standards: https://docs.vapor.codes/3.0/fluent/models/#create

Parameters

connection

A established connection.